ci: release: never move the "latest" image tag (testing)

Drop the "latest" tag from every release step that could publish it:
the per-arch kata-deploy images, the multi-arch kata-deploy manifest, and
the kata-monitor images/manifest. This guarantees a release run from this
branch can never move the "latest" tag of any published image while we test
the rest of the pipeline.
This commit is contained in:
Fabiano Fidêncio
2026-06-13 12:52:30 +02:00
parent 7ecfa486bc
commit a843844ccb
6 changed files with 17 additions and 9 deletions

View File

@@ -74,7 +74,8 @@ jobs:
tag=$(echo "$GITHUB_REF" | cut -d/ -f3-)
if [ "${tag}" = "main" ]; then
tag=$(./tools/packaging/release/release.sh release-version)
tags=("${tag}" "latest")
# TESTING: drop "latest" so a run from this branch never moves it.
tags=("${tag}")
else
tags=("${tag}")
fi

View File

@@ -74,7 +74,8 @@ jobs:
tag=$(echo "$GITHUB_REF" | cut -d/ -f3-)
if [ "${tag}" = "main" ]; then
tag=$(./tools/packaging/release/release.sh release-version)
tags=("${tag}" "latest")
# TESTING: drop "latest" so a run from this branch never moves it.
tags=("${tag}")
else
tags=("${tag}")
fi

View File

@@ -35,10 +35,10 @@ jobs:
tag=$(echo "${GITHUB_REF}" | cut -d/ -f3-)
if [ "${tag}" = "main" ]; then
tag=$(./tools/packaging/release/release.sh release-version)
echo "tags=${tag} latest" >> "$GITHUB_OUTPUT"
else
echo "tags=${tag}" >> "$GITHUB_OUTPUT"
fi
# TESTING: never include the "latest" tag so a run from this branch
# can never move the "latest" image tag.
echo "tags=${tag}" >> "$GITHUB_OUTPUT"
publish-monitor:
needs: resolve-tags
@@ -65,7 +65,9 @@ jobs:
commit-hash: ${{ github.sha }}
registry: quay.io
repo: kata-containers/kata-monitor
tag: latest
# TESTING: fallback tag must not be "latest" so a run from this branch
# can never move the "latest" image tag (tags below overrides this anyway).
tag: ${{ needs.resolve-tags.outputs.tags }}
tags: ${{ needs.resolve-tags.outputs.tags }}
tag-suffix: ${{ matrix.tag_suffix }}
runner: ${{ matrix.runner }}

View File

@@ -71,7 +71,8 @@ jobs:
tag=$(echo "$GITHUB_REF" | cut -d/ -f3-)
if [ "${tag}" = "main" ]; then
tag=$(./tools/packaging/release/release.sh release-version)
tags=("${tag}" "latest")
# TESTING: drop "latest" so a run from this branch never moves it.
tags=("${tag}")
else
tags=("${tag}")
fi

View File

@@ -72,7 +72,8 @@ jobs:
tag=$(echo "$GITHUB_REF" | cut -d/ -f3-)
if [ "${tag}" = "main" ]; then
tag=$(./tools/packaging/release/release.sh release-version)
tags=("${tag}" "latest")
# TESTING: drop "latest" so a run from this branch never moves it.
tags=("${tag}")
else
tags=("${tag}")
fi

View File

@@ -121,7 +121,9 @@ jobs:
- name: Get the image tags
run: |
release_version=$(./tools/packaging/release/release.sh release-version)
echo "KATA_DEPLOY_IMAGE_TAGS=$release_version latest" >> "$GITHUB_ENV"
# TESTING: do NOT include the "latest" tag so a run from this branch
# can never move the "latest" image tag.
echo "KATA_DEPLOY_IMAGE_TAGS=$release_version" >> "$GITHUB_ENV"
- name: Publish multi-arch manifest on quay.io & ghcr.io
run: |