Skip to content

Commit

Permalink
Add retry in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
charphi committed Sep 2, 2024
1 parent c0aac92 commit 02776a5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/java-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ jobs:
cache: 'maven'

- name: Pre-download dependencies with Maven
run: mvn -U -B -ntp dependency:go-offline
uses: nick-fields/retry@v3
with:
command: mvn -U -B -ntp dependency:go-offline
max_attempts: 3
timeout_minutes: 5

- name: Build and (headless) test with Maven
uses: smithki/[email protected]
Expand All @@ -48,7 +52,11 @@ jobs:

steps:
- name: Merge PR
run: gh pr merge --auto --rebase "$PR_URL"
uses: nick-fields/retry@v3
with:
command: gh pr merge --auto --rebase "$PR_URL"
max_attempts: 3
timeout_minutes: 5
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand Down

0 comments on commit 02776a5

Please sign in to comment.