Update with better retry methods

Update with better retry methods

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
Bensuperpc 2022-05-20 12:52:43 +02:00
parent 3ba17b10e1
commit c9e7d316ca

View File

@ -25,13 +25,7 @@ jobs:
fetch-depth: 1 fetch-depth: 1
- name: build - name: build
uses: nick-fields/retry@v2 run: for i in {1..3}; do make base && break || sleep 30; done
with:
timeout_minutes: 120
retry_wait_seconds: 40
max_attempts: 3
retry_on: error
command: make base
- name: test - name: test
run: make base.test run: make base.test
@ -39,7 +33,7 @@ jobs:
- name: archive base - name: archive base
run: | run: |
mkdir -p cache mkdir -p cache
docker save dockcross/base:latest | xz -e9 -T0 > ./cache/base.tar.xz docker save dockcross/base:latest | xz -e7 -T0 > ./cache/base.tar.xz
- name: save base - name: save base
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@ -50,13 +44,7 @@ jobs:
- name: deploy - name: deploy
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
uses: nick-fields/retry@v2 run: |
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 login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }}
docker image push dockcross/base --all-tags docker image push dockcross/base --all-tags
@ -869,13 +857,7 @@ jobs:
run: xz -d -k < ./cache/base.tar.xz | docker load run: xz -d -k < ./cache/base.tar.xz | docker load
- name: build - name: build
uses: nick-fields/retry@v2 run: for i in {1..3}; do make ${{ matrix.arch_name.image }} && break || sleep 30; done
with:
timeout_minutes: 360
retry_wait_seconds: 20
max_attempts: 3
retry_on: error
command: make ${{ matrix.arch_name.image }}
- name: basic test - name: basic test
run: make ${{ matrix.arch_name.image }}.test run: make ${{ matrix.arch_name.image }}.test
@ -957,12 +939,6 @@ jobs:
- name: deploy - name: deploy
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
uses: nick-fields/retry@v2 run: |
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 login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }}
docker image push dockcross/${{ matrix.arch_name.image }} --all-tags docker image push dockcross/${{ matrix.arch_name.image }} --all-tags