ci: push immutable sha- and moving main-cuda- tags alongside the version label
Build CUDA image (fork) / build (push) Successful in 1m9s
Build CUDA image (fork) / build (push) Successful in 1m9s
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-<short> (immutable pin) and main-cuda-<llamacpp> (explicit latest-main), so deployments can choose mutable-tracking or exact-pin deliberately. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AXQxVhXBw8PwFAtsVrXSmj
This commit is contained in:
@@ -46,9 +46,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
LS_VER="${{ inputs.llama_swap_version || 'v230' }}"
|
LS_VER="${{ inputs.llama_swap_version || 'v230' }}"
|
||||||
LCPP="${{ inputs.llamacpp_build || 'b9821' }}"
|
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 "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 "base_tag=server-cuda-${LCPP}"
|
||||||
echo "ls_version=${LS_VER}"
|
echo "ls_version=${LS_VER}"
|
||||||
echo "build_date=$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
echo "build_date=$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
||||||
@@ -76,8 +82,8 @@ jobs:
|
|||||||
LS_VERSION=${{ steps.meta.outputs.ls_version }}
|
LS_VERSION=${{ steps.meta.outputs.ls_version }}
|
||||||
GIT_HASH=${{ github.sha }}
|
GIT_HASH=${{ github.sha }}
|
||||||
BUILD_DATE=${{ steps.meta.outputs.build_date }}
|
BUILD_DATE=${{ steps.meta.outputs.build_date }}
|
||||||
tags: ${{ steps.meta.outputs.image }}:${{ steps.meta.outputs.tag }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
|
||||||
- name: Summary
|
- name: Summary
|
||||||
run: |
|
run: |
|
||||||
echo "Pushed ${{ steps.meta.outputs.image }}:${{ steps.meta.outputs.tag }}" >> "$GITHUB_STEP_SUMMARY"
|
echo "Pushed ${{ steps.meta.outputs.tags }}" >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
|||||||
Reference in New Issue
Block a user