mirror of
https://github.com/beshu-tech/deltaglider.git
synced 2026-03-23 09:31:03 +01:00
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 <noreply@anthropic.com>
This commit is contained in:
4
.github/workflows/docker-publish.yml
vendored
4
.github/workflows/docker-publish.yml
vendored
@@ -65,8 +65,8 @@ jobs:
|
||||
type=semver,pattern={{major}}
|
||||
# For PRs: tag as pr-<number>
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user