From 6cab3de9a041745707e1d41dbea9686c7ca51882 Mon Sep 17 00:00:00 2001 From: Simone Scarduzio Date: Sat, 7 Feb 2026 15:57:37 +0100 Subject: [PATCH] fix: disable sha tag on tag pushes to avoid invalid Docker tag The sha tag template `prefix={{branch}}-` produces `:-hash` on tag pushes because {{branch}} is empty, resulting in an invalid Docker tag like `beshultd/deltaglider:-482f45f`. Only emit sha tags on branch pushes. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/docker-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 66227e6..6cc03bc 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -65,8 +65,8 @@ jobs: type=semver,pattern={{major}} # For PRs: tag as pr- type=ref,event=pr - # Always include git sha for traceability - type=sha,prefix={{branch}}- + # Include git sha for traceability (only on branch pushes, not tags) + type=sha,prefix={{branch}}-,enable=${{ startsWith(github.ref, 'refs/heads/') }} - name: Build and push Docker image uses: docker/build-push-action@v5