ci: harden gitea workflow reruns
Some checks failed
Release Dry Run / release-dry-run (push) Failing after 5s
Codex Template Compliance / template-compliance (push) Successful in 5s
Build / test-and-image (push) Successful in 52s

This commit is contained in:
2026-05-17 12:52:12 +02:00
parent 0559481656
commit b309bd690e
3 changed files with 11 additions and 5 deletions

View File

@@ -38,7 +38,12 @@ jobs:
run: docker compose config
- name: Build Docker image
run: docker build -t "${REGISTRY_HOST}/${REGISTRY_NAMESPACE}/${IMAGE_NAME}:${GITHUB_SHA}" .
shell: bash
run: |
image="${REGISTRY_HOST}/${REGISTRY_NAMESPACE}/${IMAGE_NAME}"
build_tag="build-${GITHUB_RUN_ID:-local}-${GITHUB_RUN_NUMBER:-0}"
echo "BUILD_IMAGE=${image}:${build_tag}" >> "$GITHUB_ENV"
docker build -t "${image}:${build_tag}" .
- name: Publish Docker image
if: ${{ env.REGISTRY_TOKEN != '' }}
@@ -47,8 +52,9 @@ jobs:
image="${REGISTRY_HOST}/${REGISTRY_NAMESPACE}/${IMAGE_NAME}"
date_tag="$(date -u +%Y%m%d)"
echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY_HOST}" -u "${REGISTRY_USERNAME}" --password-stdin
docker tag "${image}:${GITHUB_SHA}" "${image}:latest"
docker tag "${image}:${GITHUB_SHA}" "${image}:${date_tag}"
docker tag "${BUILD_IMAGE}" "${image}:${GITHUB_SHA}"
docker tag "${BUILD_IMAGE}" "${image}:latest"
docker tag "${BUILD_IMAGE}" "${image}:${date_tag}"
docker push "${image}:${GITHUB_SHA}"
docker push "${image}:latest"
docker push "${image}:${date_tag}"

View File

@@ -38,7 +38,7 @@ jobs:
for path in "${placeholder_paths[@]}"; do
[ -e "$path" ] || continue
if grep -RInE --exclude-dir=.git "$placeholder_pattern" "$path"; then
if grep -RInE --exclude-dir=.git --exclude='release-dry-run.yml' --exclude='template-compliance.yml' "$placeholder_pattern" "$path"; then
echo "Unresolved template placeholders found."
missing=1
fi

View File

@@ -58,7 +58,7 @@ jobs:
for path in "${paths[@]}"; do
[ -e "$path" ] || continue
if grep -RInE --exclude-dir=.git "$pattern" "$path"; then
if grep -RInE --exclude-dir=.git --exclude='release-dry-run.yml' --exclude='template-compliance.yml' "$pattern" "$path"; then
found=1
fi
done