From 8b73e5f331d78a27cfff24980ed1d0e8dc63fdd0 Mon Sep 17 00:00:00 2001 From: erabii Date: Thu, 31 Aug 2023 03:40:32 +0300 Subject: [PATCH] Retry on cache failure (2) (#1422) --- .github/workflows/composites/cache/action.yaml | 14 +++++++++----- .../composites/download-docker-images/action.yaml | 13 +++++++------ .../composites/upload-docker-images/action.yaml | 12 ++++++++---- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/composites/cache/action.yaml b/.github/workflows/composites/cache/action.yaml index cd384a8e..792bb396 100644 --- a/.github/workflows/composites/cache/action.yaml +++ b/.github/workflows/composites/cache/action.yaml @@ -3,9 +3,13 @@ description: cache runs: using: "composite" steps: - - uses: buildjet/cache@v3 + + - uses: Wandalen/wretry.action@master with: - path: ~/.m2/repository - key: ${{ runner.os }}-cache-${{ env.BRANCH_NAME }}-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-cache-${{ env.BRANCH_NAME }}-${{ hashFiles('**/pom.xml') }} + attempt_limit: 3 + action: buildjet/cache@v3 + with: | + path: ~/.m2/repository + key: ${{ runner.os }}-cache-${{ env.BRANCH_NAME }}-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-cache-${{ env.BRANCH_NAME }}-${{ hashFiles('**/pom.xml') }} + diff --git a/.github/workflows/composites/download-docker-images/action.yaml b/.github/workflows/composites/download-docker-images/action.yaml index 6c20a8d5..a66933d7 100644 --- a/.github/workflows/composites/download-docker-images/action.yaml +++ b/.github/workflows/composites/download-docker-images/action.yaml @@ -7,10 +7,11 @@ runs: using: "composite" steps: - - uses: buildjet/cache@v3 + - uses: Wandalen/wretry.action@master with: - path: /tmp/docker/images - key: docker-images-cache-${{ env.DOCKER_IMAGES_KEY }} - restore-keys: docker-images-cache-${{ env.DOCKER_IMAGES_KEY }} - - + attempt_limit: 3 + action: buildjet/cache@v3 + with: | + path: /tmp/docker/images + key: docker-images-cache-${{ env.DOCKER_IMAGES_KEY }} + restore-keys: docker-images-cache-${{ env.DOCKER_IMAGES_KEY }} diff --git a/.github/workflows/composites/upload-docker-images/action.yaml b/.github/workflows/composites/upload-docker-images/action.yaml index 2fbd2e37..83c7657e 100644 --- a/.github/workflows/composites/upload-docker-images/action.yaml +++ b/.github/workflows/composites/upload-docker-images/action.yaml @@ -6,10 +6,14 @@ description: upload docker images runs: using: "composite" steps: - - uses: buildjet/cache@v3 + + - uses: Wandalen/wretry.action@master with: - path: /tmp/docker/images - key: docker-images-cache-${{ env.DOCKER_IMAGES_KEY }} - restore-keys: docker-images-cache-${{ env.DOCKER_IMAGES_KEY }} + attempt_limit: 3 + action: buildjet/cache@v3 + with: | + path: /tmp/docker/images + key: docker-images-cache-${{ env.DOCKER_IMAGES_KEY }} + restore-keys: docker-images-cache-${{ env.DOCKER_IMAGES_KEY }}