File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 1919
2020 - name : Set env vars
2121 run : |
22- GIT_BRANCH="${GITHUB_REF#refs/heads/}"
22+ if [ -n "$GITHUB_BASE_REF" ]; then
23+ GIT_BRANCH="$GITHUB_BASE_REF"
24+ else
25+ GIT_BRANCH="${GITHUB_REF#refs/heads/}"
26+ fi
2327 echo "GIT_BRANCH = $GIT_BRANCH"
2428 if [ -z "$GIT_BRANCH" ]; then exit 1; fi
2529
@@ -107,7 +111,11 @@ jobs:
107111 steps :
108112 - name : Set env vars
109113 run : |
110- GIT_BRANCH="${GITHUB_REF#refs/heads/}"
114+ if [ -n "$GITHUB_BASE_REF" ]; then
115+ GIT_BRANCH="$GITHUB_BASE_REF"
116+ else
117+ GIT_BRANCH="${GITHUB_REF#refs/heads/}"
118+ fi
111119 echo "GIT_BRANCH = $GIT_BRANCH"
112120 if [ -z "$GIT_BRANCH" ]; then exit 1; fi
113121
Original file line number Diff line number Diff line change 1919
2020 - name : Set env vars
2121 run : |
22- GIT_BRANCH="${GITHUB_REF#refs/heads/}"
22+ if [ -n "$GITHUB_BASE_REF" ]; then
23+ GIT_BRANCH="$GITHUB_BASE_REF"
24+ else
25+ GIT_BRANCH="${GITHUB_REF#refs/heads/}"
26+ fi
2327 echo "GIT_BRANCH = $GIT_BRANCH"
2428 if [ -z "$GIT_BRANCH" ]; then exit 1; fi
2529
@@ -123,7 +127,11 @@ jobs:
123127 steps :
124128 - name : Set env vars
125129 run : |
126- GIT_BRANCH="${GITHUB_REF#refs/heads/}"
130+ if [ -n "$GITHUB_BASE_REF" ]; then
131+ GIT_BRANCH="$GITHUB_BASE_REF"
132+ else
133+ GIT_BRANCH="${GITHUB_REF#refs/heads/}"
134+ fi
127135 echo "GIT_BRANCH = $GIT_BRANCH"
128136 if [ -z "$GIT_BRANCH" ]; then exit 1; fi
129137
You can’t perform that action at this time.
0 commit comments