From a4777e5411026cc1612ccb2fa1a7d5eb11cbda6c Mon Sep 17 00:00:00 2001 From: Philippe Charles Date: Mon, 2 Sep 2024 10:55:16 +0200 Subject: [PATCH] Add retry in workflow --- .github/workflows/java8-maven.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/java8-maven.yml b/.github/workflows/java8-maven.yml index d0683de..3bfc805 100644 --- a/.github/workflows/java8-maven.yml +++ b/.github/workflows/java8-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}}