Repository navigation
fix(ci): publish distinct per-image tags for prerelease versions - #979
Merged
Merged
Conversation
docker/metadata-action rewrites every {{version}}-based pattern to plain
{{version}} for prerelease versions, so each matrix image pushed to the same
version tag and the last build won: v2.0.0-beta.1 tagged the web image as
:2.0.0-beta.1 and created no :2.0.0-beta.1-<image> tags. Limit the
{{version}}-<image> rule to stable tags and build the per-image prerelease
tag from the tag name instead. :<version> stays on the default image only.
3 of 14 tasks
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.
Summary
Fixes prerelease image tagging. For
v2.0.0-beta.1, every image in the build matrix pushed to:2.0.0-beta.1and the last build won, so that tag holds the web image, and no:2.0.0-beta.1-<image>tags exist. docker/metadata-action rewrites any{{version}}-based pattern to plain{{version}}for prerelease versions, which drops the-<image>suffix.Type of Change
Related Issues
Related to #965. Follows #978.
Changes Made
Resolve prerelease version(only onv*tags containing-) outputs the tag name without the leadingv.{{version}}-<image>semver rule is limited to stable tags.<version>-<image>for prerelease tags, for example2.0.0-beta.1-omnibus.{{version}}without suffix stays on the default (omnibus) image only, so:2.0.0-beta.2will be omnibus.{{version}}-<image>,{{major}}.{{minor}},{{major}},latestbehave as before.Testing
actionlintclean. Evidence for the bug: thev2.0.0-beta.1tag run (38482205001) pushed onlyghcr.io/starosdev/scrutiny:2.0.0-beta.1, and that manifest's entrypoint is/entrypoint-web.sh. The next prerelease tag is the real test: expect:2.0.0-beta.Non omnibus plus one:2.0.0-beta.N-<image>per matrix image, and unchangedlatest,1,2,2.0.Checklist
Notes
:2.0.0-beta.1is left as published (web image); its release notes point testers to:beta-omnibus.Review: required (release publishing behavior changes on merge with no separate deploy step)