docs: Add advice for pre-release image tag (v prefix support)#590
Open
polarathene wants to merge 1 commit intodocker:masterfrom
Open
docs: Add advice for pre-release image tag (v prefix support)#590polarathene wants to merge 1 commit intodocker:masterfrom
v prefix support)#590polarathene wants to merge 1 commit intodocker:masterfrom
Conversation
This caveat was not easily apparent and has tripped up users. This addition should help raise awareness in advance of triggering the mistake. Signed-off-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
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.
Resolves: #422
This caveat was not easily apparent and has tripped up users. This addition should help raise awareness in advance of triggering the mistake.
The original issue that I provided the information on lacked some context about the reporters workflow config and inputs at the time. They were stating that
vprefix was not always stripped. Recently I revisited the issue and confirmed that as of the current release ofdocker/metadata-actionthevprefix stripping behaviour of input values/refs works as documented and expected.The inverse, of wanting the image tag to always produce tags with a
vprefix for semver/pep440 tags is a bit more complicated though (arguably a bug from converting rather than discarding tag patterns usingmajor,minor,patchexpressions).Advice summary
The linked caveat highlights that depending on the input value/ref expected, the following examples can produce mixed tags with
vprefix present or missing:Example A:
Outputs:
Example B:
Outputs:
In both cases, the correction is to use
,prefix=v:Example A:
Example B:
Effectively the same as above but with
{{ raw }}(discouraged due to semantics of{{ raw }}vs{{ version }}based on input value/ref, wherevprefix is expected here for the raw input):Output in both cases (assuming correct input for B):