Skip to content

Commit 4e90f5a

Browse files
committed
Fix prerelease reference workflow push failure when PR exists
--force-with-lease fails with "stale info" because the workflow checks out the prerelease branch but never fetches the auto/prerelease-reference remote ref, so git has nothing to compare against. Use --force instead, which is safe given the concurrency group prevents overlapping runs.
1 parent 5725511 commit 4e90f5a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/update-prerelease-reference.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@ jobs:
193193
EOF
194194
195195
if [ -n "$existing_pr_number" ]; then
196-
# Update existing PR - force-with-lease to avoid overwriting unexpected changes
197-
git push --force-with-lease origin "$branch"
196+
# Force-push is safe: concurrency group prevents overlapping runs,
197+
# and only this workflow writes to this branch.
198+
git push --force origin "$branch"
198199
gh pr edit "$existing_pr_number" --body-file "$RUNNER_TEMP/pr-body.md"
199200
200201
pr_url="${{ steps.check-pr.outputs.existing_pr_url }}"

0 commit comments

Comments
 (0)