From 02776a51243da0afc7de11b43c3018b5e3a0220d Mon Sep 17 00:00:00 2001 From: Philippe Charles Date: Mon, 2 Sep 2024 10:38:58 +0200 Subject: [PATCH] Add retry in workflow --- .github/workflows/java-maven.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/java-maven.yml b/.github/workflows/java-maven.yml index c0286e7..aef87f2 100644 --- a/.github/workflows/java-maven.yml +++ b/.github/workflows/java-maven.yml @@ -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/xvfb-action@v1.1.2 @@ -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}}