Skip to content

Commit 27c6dfb

Browse files
committed
fix: pull --rebase before push in commit step to avoid race condition
If the remote advances between the workflow's checkout and its commit step (e.g., another push lands in between), the push was rejected. Now we rebase onto the latest remote HEAD before pushing.
1 parent bec2b30 commit 27c6dfb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ runs:
7575
echo "No changes to commit."
7676
else
7777
git commit -m "Update code graph JSON & index [skip ci]"
78+
git pull --rebase origin "${GITHUB_REF#refs/heads/}"
7879
git push
7980
fi
8081
shell: bash

0 commit comments

Comments
 (0)