Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/release-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,13 @@ jobs:
fi

git switch -c "$BRANCH"
git push --force-with-lease origin "HEAD:$BRANCH"
# The API call above may have created this ref in the remote after
# the checkout was fetched. `git push --force-with-lease` would then
# reject the first push because the runner has no local tracking value.
# This commit is based on the release base SHA, so an ordinary push is
# the safe fast-forward operation and still rejects an unexpected
# remote update.
git push origin "HEAD:$BRANCH"

PR_URL=$(gh pr list --repo "${{ github.repository }}" --head "$BRANCH" --base "$BASE" --state open --json url --jq '.[0].url')
if [ -z "$PR_URL" ]; then
Expand Down
Loading