Skip to content

Commit

Permalink
fix(workflow): update tagging logic in GitHub Actions
Browse files Browse the repository at this point in the history
- Exclude tags containing hyphens from Docker image tagging logic.
- Ensure only proper version tags trigger the latest tag update.
  • Loading branch information
laipz8200 committed Sep 29, 2024
1 parent 74f58f2 commit 66f944a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
with:
images: ${{ env[matrix.image_name_env] }}
tags: |
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-') }}
type=ref,event=branch
type=sha,enable=true,priority=100,prefix=,suffix=,format=long
type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
Expand Down

0 comments on commit 66f944a

Please sign in to comment.