fix release tag parsing from body#1216
Closed
asraa wants to merge 4 commits intoslsa-framework:mainfrom
Closed
Conversation
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Contributor
Author
|
Just used a grep match for a version string: https://github.com/slsa-framework/slsa-github-generator/actions/runs/3413607704/jobs/5680520567 Worked here @laurentsimon |
Signed-off-by: Asra Ali <asraa@google.com>
ianlewis
approved these changes
Nov 7, 2022
| if: ${{ contains(github.event.pull_request.body, '#label:release') }} | ||
| run: | | ||
| echo ${{ github.event.pull_request.body }} | awk '{print $2}' | ||
| RELEASE_TAG=$(echo "${{ github.event.pull_request.body }}" | grep -o -e 'v[0-9].[0-9].[0-9]') |
Member
There was a problem hiding this comment.
'.' will get interpreted as regex so it probably should be escaped. otherwise it matches strings like 'v1a2b3'. Also we'll want to match multiple digits.
Suggested change
| RELEASE_TAG=$(echo "${{ github.event.pull_request.body }}" | grep -o -e 'v[0-9].[0-9].[0-9]') | |
| RELEASE_TAG=$(echo "${{ github.event.pull_request.body }}" | grep -o -e 'v[0-9]\+\.[0-9]\+\.[0-9]\+') |
Contributor
Author
There was a problem hiding this comment.
Noted, I think it got copied into https://github.com/slsa-framework/slsa-github-generator/pull/1210/files, let's merge yours which does a code freeze, but I'll fix that next release
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.
This is a test!
Signed-off-by: Asra Ali asraa@google.com