Skip the branch-sha Docker tag on tag pushes - #3
Merged
Merged
Conversation
On a v* tag push {{branch}} expands to nothing, producing the invalid
image tag ':-<sha>' and failing the whole buildx push, so tagged
releases never published a Docker image. Only emit the branch-sha tag
for branch pushes; semver tags cover releases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The v1.1.0 tag push failed the Docker publish workflow: the
type=sha,prefix={{branch}}-tag template expands{{branch}}to an empty string on tag events, producing the invalid references3dir:-702f288and failing the entire buildx push — so tagged releases never published an image (the binaries Release workflow succeeded).Fix: enable the branch-sha tag only when
github.ref_type == 'branch'. Tag pushes are fully covered by the three semver patterns pluslatest.After merging, v1.1.0 needs re-pointing at the fix commit (workflow definitions are read from the tag's own commit, so re-running the failed job or re-pushing the same tag would still use the broken template). The only diff is this workflow line — the binaries already published for v1.1.0 are built from identical code. I can do the re-tag once this lands.