File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,7 +111,21 @@ jobs:
111111 git commit --allow-empty -m "commit changes to resource_hash_table.json"
112112 git push -f --set-upstream origin ${{ env.VERSION }}-deploy
113113 gh pr create --fill
114- gh pr merge -s -d -t "Update changelog and bump version to next patch level for nightly releases"
114+ # Wait briefly for PR to be fully processed before merging
115+ sleep 5
116+ # Retry merge up to 3 times in case of transient API errors
117+ for attempt in 1 2 3; do
118+ if gh pr merge -s -d -t "Update changelog and bump version to next patch level for nightly releases"; then
119+ echo "PR merged successfully"
120+ break
121+ elif [ $attempt -lt 3 ]; then
122+ echo "Merge attempt $attempt failed, retrying in 10 seconds..."
123+ sleep 10
124+ else
125+ echo "Failed to merge PR after 3 attempts"
126+ exit 1
127+ fi
128+ done
115129 env :
116130 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
117131
You can’t perform that action at this time.
0 commit comments