Skip to content

Commit

Permalink
Add retry to auto-merge-job
Browse files Browse the repository at this point in the history
  • Loading branch information
charphi committed Sep 2, 2024
1 parent 17c6ce7 commit d3e7c4a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/java8-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Merge PR
run: gh pr merge --auto --rebase "$PR_URL"
run: |
for i in {1..3}; do
if gh pr merge --auto --rebase "$PR_URL"; then
break
fi
if [[ $i -eq 3 ]]; then
exit 1
fi
sleep 5
done
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand Down

0 comments on commit d3e7c4a

Please sign in to comment.