Skip to content

Commit

Permalink
ci: fix regex in conditional
Browse files Browse the repository at this point in the history
The regex wasn't considering an initial v, and would have considered
every release a candidate one.

Signed-off-by: Francesco Canovai <[email protected]>
  • Loading branch information
fcanovai committed Jun 25, 2024
1 parent dc35dee commit 8b559b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
-
name: Get tag
run: |
TAG=${GITHUB_REF##*/}
TAG=${GITHUB_REF##*/v}
if [[ "${TAG}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
DEST=$(echo ${TAG#v} | awk -F '[.]' '{print "release-"$1"."$2}')
DEST=$(echo ${TAG} | awk -F '[.]' '{print "release-"$1"."$2}')
else
DEST="main"
fi
echo "TAG=${TAG#v}" >> $GITHUB_ENV
echo "TAG=${TAG}" >> $GITHUB_ENV
echo "DEST=${DEST}" >> $GITHUB_ENV
-
name: Pull Request
Expand Down

0 comments on commit 8b559b0

Please sign in to comment.