From 4b1ce01a6bd8d16a8767b434716ed4806e775a0a Mon Sep 17 00:00:00 2001 From: Guilherme Santos Date: Wed, 1 Jul 2026 15:33:45 +0200 Subject: [PATCH] fix(lcm): assure latest tag matches retagged ones --- .github/workflows/lcm-stable-retag.yaml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lcm-stable-retag.yaml b/.github/workflows/lcm-stable-retag.yaml index c67ee9a74..82d6bd016 100644 --- a/.github/workflows/lcm-stable-retag.yaml +++ b/.github/workflows/lcm-stable-retag.yaml @@ -64,17 +64,21 @@ jobs: major=$(echo "$TAG" | cut -d. -f1) images=( ${{ env.images }} ) clusters=( ${{ env.clusters }} ) + crane_tag() { + local src=$1 tag=$2 + if [ "${DRY_RUN}" == 'true' ]; then + echo "[dry-run] crane tag ${src} ${tag}" + else + crane tag "${src}" "${tag}" + echo "Tagged ${src} → ${tag}" + fi + } for image in "${images[@]}"; do src="${INFRA_REPO_URL}/stable/${image}:${TAG}" for cluster in "${clusters[@]}"; do - major_tag="M${major}-${cluster}" - if [ "${DRY_RUN}" == 'true' ]; then - echo "[dry-run] crane tag ${src} ${major_tag}" - else - crane tag "${src}" "${major_tag}" - echo "Tagged ${image}:${TAG} → ${image}:${major_tag}" - fi + crane_tag "${src}" "M${major}-${cluster}" done + crane_tag "${src}" latest done - name: Summary