Skip to content

Commit 0a7d93c

Browse files
TheSmallPixelclaude
andcommitted
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. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e0ebdd6 commit 0a7d93c

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)