We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37a5415 commit 3cf9949Copy full SHA for 3cf9949
.github/build.sh
@@ -9,14 +9,14 @@ if [ -x "/bin/sudo" ]; then
9
fi
10
11
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
12
- PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
+ PR_NUMBER=${GITHUB_REF##*/}
13
if [ "$GITHUB_BASE_REF" == "master" ]; then
14
SUFFIX="-pr$PR_NUMBER"
15
else
16
SUFFIX="$GITHUB_BASE_REF-pr$PR_NUMBER"
17
18
19
- BRANCH=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
+ BRANCH=$${GITHUB_REF##*/}
20
if [ "$BRANCH" != "master" ]; then
21
SUFFIX="$BRANCH"
22
0 commit comments