We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74b07bc commit c60738fCopy full SHA for c60738f
.github/build.sh
@@ -16,9 +16,10 @@ if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
16
SUFFIX="$GITHUB_BASE_REF-pr$PR_NUMBER"
17
fi
18
else
19
- BRANCH=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
20
- if [ "$BRANCH" != "master" ]; then
21
- SUFFIX="$BRANCH"
+ if [ "$GITHUB_REF_TYPE" == "tag" && "$GITHUB_BASE_REF" =~ ^[0-9]+\.[0-9]+\.[0-9]+(.+)$ ]; then
+ SUFFIX="${BASH_REMATCH[1]}"
+ elif [ "$GITHUB_BASE_REF" != "master" ]; then
22
+ SUFFIX="$GITHUB_BASE_REF"
23
24
25
if [ -n "$SUFFIX" ]; then
0 commit comments