Fix bug of tag_version_prefix is empty#1
Open
Freed-Wu wants to merge 1 commit intoaksh1618:masterfrom
Open
Conversation
Owner
|
Hey there @Freed-Wu, my sincere apologies, I somehow missed this. I can't recall why I set a default value for this, even though this has been set as a required parameter. I'm a bit out of touch w.r.t. github actions, feel free to chip in if you can think of a possible reason. I think if it's a required parameter, then it's safe to not require a default value for it in the entrypoint script. If you'd like to go ahead with this MR, we need to make at least the following changes:
|
Author
|
In my fork, I have changed it to NEW_RELEASE=${GITHUB_REF#refs/tags/}
NEW_RELEASE=${NEW_RELEASE#${INPUT_TAG_VERSION_PREFIX:-v}}And it works for me. |
`git tag 0.0.1` and `tag_version_prefix: ""` will trigger this bug.
`${INPUT_TAG_VERSION_PREFIX:-v}` will return 'v' when `$INPUT_TAG_VERSION_PREFIX` is ""
Author
|
We should use GITHUB_REF_NAME not GITHUB_REF. document is here. GITHUB_REF is "refs/tags/$GITHUB_REF_NAME" |
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.
git tag 0.0.1andtag_version_prefix: ""will trigger this bug.${INPUT_TAG_VERSION_PREFIX:-v}will return 'v' when$INPUT_TAG_VERSION_PREFIXis ""Description
Motivation and Context
Closes #
Screenshots (if appropriate)
How Has This Been Tested
Checklist