Skip to content

Commit 268a13d

Browse files
kompreclaude
andcommitted
Fix version bump race condition with pull before push
When multiple labels are added simultaneously, multiple workflow runs can trigger. Add git pull --rebase before push to handle concurrent commits from parallel workflow runs. This prevents push failures when another workflow instance has already pushed changes to the PR branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7405c7d commit 268a13d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/version-bump.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ jobs:
9999
echo "No changes to commit"
100100
else
101101
git commit -m "Bump version to ${{ steps.bump.outputs.new_version }} [skip ci]"
102+
103+
# Pull with rebase in case another workflow pushed
104+
git pull --rebase origin ${{ github.head_ref }}
105+
106+
# Push changes
102107
git push
103108
fi
104109

0 commit comments

Comments
 (0)