From 2f0bb2556e560e1487b2703c24cd2aa14c808ac4 Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Sun, 12 Jul 2026 11:25:51 -0400 Subject: [PATCH] ci: push immutable sha- and moving main-cuda- tags alongside the version label MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Push-triggered builds always defaulted to the v230 label, silently overwriting it on every main merge — a stack pinned to any other version label (v231) kept pulling stale images. Every build now also pushes sha- (immutable pin) and main-cuda- (explicit latest-main), so deployments can choose mutable-tracking or exact-pin deliberately. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01AXQxVhXBw8PwFAtsVrXSmj --- .gitea/workflows/build-cuda-image.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build-cuda-image.yml b/.gitea/workflows/build-cuda-image.yml index b81a9873..20df9347 100644 --- a/.gitea/workflows/build-cuda-image.yml +++ b/.gitea/workflows/build-cuda-image.yml @@ -46,9 +46,15 @@ jobs: run: | LS_VER="${{ inputs.llama_swap_version || 'v230' }}" LCPP="${{ inputs.llamacpp_build || 'b9821' }}" + SHORT_SHA="$(echo '${{ github.sha }}' | cut -c1-7)" + IMAGE="${REGISTRY}/${{ github.repository }}" + # Three tags per build: the version label (mutable, human-facing), + # an explicit moving main-cuda tag, and an immutable sha tag so a + # deployment can always pin the exact build. { - echo "image=${REGISTRY}/${{ github.repository }}" + echo "image=${IMAGE}" echo "tag=${LS_VER}-cuda-${LCPP}" + echo "tags=${IMAGE}:${LS_VER}-cuda-${LCPP},${IMAGE}:main-cuda-${LCPP},${IMAGE}:sha-${SHORT_SHA}" echo "base_tag=server-cuda-${LCPP}" echo "ls_version=${LS_VER}" echo "build_date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" @@ -76,8 +82,8 @@ jobs: LS_VERSION=${{ steps.meta.outputs.ls_version }} GIT_HASH=${{ github.sha }} BUILD_DATE=${{ steps.meta.outputs.build_date }} - tags: ${{ steps.meta.outputs.image }}:${{ steps.meta.outputs.tag }} + tags: ${{ steps.meta.outputs.tags }} - name: Summary run: | - echo "Pushed ${{ steps.meta.outputs.image }}:${{ steps.meta.outputs.tag }}" >> "$GITHUB_STEP_SUMMARY" + echo "Pushed ${{ steps.meta.outputs.tags }}" >> "$GITHUB_STEP_SUMMARY"