From 01d1626cf2e4ecdf88a308f6a3b103513b72985c Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 14 Feb 2026 10:34:41 +0100 Subject: [PATCH] ci(docker): publish image without leading 'v' in version tag Strip the leading 'v' from git tags (e.g. v1.1.7 -> 1.1.7) when pushing Docker images to GHCR. https://chatgpt.com/share/e/699041b9-8610-8013-8d04-fbef93b10d3c --- .github/workflows/publish-image.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index f0b30d0..9351511 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -49,7 +49,8 @@ jobs: IMAGE="ghcr.io/${{ github.repository }}" if [ "${{ github.event_name }}" = "push" ]; then - TAG="${{ github.ref_name }}" # e.g. v1.1.0 + RAW_TAG="${{ github.ref_name }}" # e.g. v1.1.7 + TAG="${RAW_TAG#v}" # -> 1.1.7 (only strips leading 'v') echo "tags=$IMAGE:$TAG,$IMAGE:latest" >> "$GITHUB_OUTPUT" else echo "tags=$IMAGE:stable" >> "$GITHUB_OUTPUT"