Skip to content

Commit f43bf51

Browse files
CI: Fix PR workflow for sha mismatch
1 parent 9fdbfbc commit f43bf51

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/pr.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ jobs:
2727
run: |
2828
prnum=$(jq --raw-output '.pull_request.number' "$GITHUB_EVENT_PATH")
2929
author=$(gh pr view "$prnum" --json 'author' --jq '.author.login')
30+
prsha='${{ github.event.pull_request.head.sha }}'
3031
3132
git fetch --depth=1 origin master
3233
git fetch --depth=10 origin bot || exit 0
3334
echo "AUTHOR: $author"
34-
echo "GITHUB_WORKFLOW_SHA: $GITHUB_WORKFLOW_SHA"
35+
echo "PRSHA: $prsha"
3536
echo "FETCH_HEAD: $(git rev-parse FETCH_HEAD)"
36-
if [ "$author" == "app/github-actions" ] && [ "$GITHUB_WORKFLOW_SHA" == "$(git rev-parse FETCH_HEAD)" ]; then
37+
if [ "$author" == "app/github-actions" ] && [ "$prsha" == "$(git rev-parse FETCH_HEAD)" ]; then
3738
git checkout master
3839
git merge origin/bot
3940
git push

0 commit comments

Comments
 (0)