Skip to content

Commit 569e677

Browse files
committed
Correction variable GIT_BRANCH
1 parent 3801f5d commit 569e677

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ jobs:
102102
echo "::set-output name=VERSION::$(cat VERSION)"
103103
echo "::set-output name=REPO_NAME::${GITHUB_REPOSITORY##*/}"
104104
105+
- name: Get branch name
106+
if: github.event_name != 'pull_request'
107+
run: echo "GIT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
108+
# run: echo "::set-env name=GIT_BRANCH::$(echo ${GITHUB_REF##*/})"
109+
110+
- name: Get branch name on pull request
111+
if: github.event_name == 'pull_request'
112+
run: echo "GIT_BRANCH=${GITHUB_HEAD_REF}" >> GITHUB_ENV
113+
#run: echo "::set-env name=GIT_BRANCH::$(echo ${GITHUB_HEAD_REF})"
114+
105115
- name: Install sdk
106116
uses: actions/cache@v2
107117
with:

0 commit comments

Comments
 (0)