From 7876c21e62bcd8b459e9060b6bf19c33f799c7a4 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Thu, 19 May 2022 11:05:42 +0200 Subject: [PATCH] Add retry on deploy step Add retry on deploy step Signed-off-by: Bensuperpc --- .github/workflows/main.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 19069cc..501f123 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,9 +50,15 @@ jobs: - name: deploy if: github.ref == 'refs/heads/master' - run: | - docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }} - docker image push dockcross/base --all-tags + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + retry_wait_seconds: 30 + max_attempts: 4 + retry_on: error + command: | + docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }} + docker image push dockcross/base --all-tags image: name: ${{ matrix.arch_name.image }} @@ -951,6 +957,12 @@ jobs: - name: deploy if: github.ref == 'refs/heads/master' - run: | - docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }} - docker image push dockcross/${{ matrix.arch_name.image }} --all-tags + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + retry_wait_seconds: 30 + max_attempts: 4 + retry_on: error + command: | + docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }} + docker image push dockcross/${{ matrix.arch_name.image }} --all-tags