Skip to content

Commit 9228e27

Browse files
committed
Update workflow files
1 parent 1511f67 commit 9228e27

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ jobs:
2929

3030
- name: Get Commit hash
3131
run: |
32-
if [ "${{ github.event_name }}" = "pull_request" ]; then
33-
COMMIT_SHA=${{ github.event.pull_request.head.sha }}
32+
if [ "${EVENT_NAME}" = "pull_request" ]; then
33+
COMMIT_SHA=${PULL_SHA}
3434
else
3535
COMMIT_SHA=${GITHUB_SHA}
3636
fi
3737
echo "SHORT_SHA=$(echo $COMMIT_SHA | cut -c1-8)" >> $GITHUB_ENV
38+
env:
39+
EVENT_NAME: ${{ github.event_name }}
40+
PULL_SHA: ${{ github.event.pull_request.head.sha }}
3841

3942
- name: Export Version
4043
if: github.ref_type == 'tag'

0 commit comments

Comments
 (0)