From c9c553c9480e195af0bd88da020e22817277469f Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 7 Jun 2023 20:15:26 -0700 Subject: [PATCH 1/2] Fix pod caching logic --- .github/workflows/platformDeploy.yml | 4 ++-- .github/workflows/testBuild.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/platformDeploy.yml b/.github/workflows/platformDeploy.yml index 48c8e38fe3e1..bac7ab34920d 100644 --- a/.github/workflows/platformDeploy.yml +++ b/.github/workflows/platformDeploy.yml @@ -158,13 +158,13 @@ jobs: bundler-cache: true - uses: actions/cache@v3 + id: cache-pods with: path: ios/Pods key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} - restore-keys: | - ${{ runner.os }}-pods- - name: Install cocoapods + if: steps.cache-pods.outputs.cache-hit != 'true' uses: nick-invision/retry@0711ba3d7808574133d713a0d92d2941be03a350 with: timeout_minutes: 10 diff --git a/.github/workflows/testBuild.yml b/.github/workflows/testBuild.yml index 9b4bf6d020d6..b75ee2a402e4 100644 --- a/.github/workflows/testBuild.yml +++ b/.github/workflows/testBuild.yml @@ -141,13 +141,13 @@ jobs: bundler-cache: true - uses: actions/cache@v3 + id: cache-pods with: path: ios/Pods key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} - restore-keys: | - ${{ runner.os }}-pods- - name: Install cocoapods + if: steps.cache-pods.outputs.cache-hit != 'true' uses: nick-invision/retry@0711ba3d7808574133d713a0d92d2941be03a350 with: timeout_minutes: 10 From d0dcf1ae759346d2085445e299b9c00f5d28384f Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 7 Jun 2023 20:23:29 -0700 Subject: [PATCH 2/2] Don't use cache on retries --- .github/workflows/platformDeploy.yml | 3 ++- .github/workflows/testBuild.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/platformDeploy.yml b/.github/workflows/platformDeploy.yml index bac7ab34920d..a5d203f86c47 100644 --- a/.github/workflows/platformDeploy.yml +++ b/.github/workflows/platformDeploy.yml @@ -159,12 +159,13 @@ jobs: - uses: actions/cache@v3 id: cache-pods + if: github.run_attempt == '1' with: path: ios/Pods key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} - name: Install cocoapods - if: steps.cache-pods.outputs.cache-hit != 'true' + if: github.run_attempt != '1' || steps.cache-pods.outputs.cache-hit != 'true' uses: nick-invision/retry@0711ba3d7808574133d713a0d92d2941be03a350 with: timeout_minutes: 10 diff --git a/.github/workflows/testBuild.yml b/.github/workflows/testBuild.yml index b75ee2a402e4..e79b2d48cd8d 100644 --- a/.github/workflows/testBuild.yml +++ b/.github/workflows/testBuild.yml @@ -142,12 +142,13 @@ jobs: - uses: actions/cache@v3 id: cache-pods + if: github.run_attempt == '1' with: path: ios/Pods key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} - name: Install cocoapods - if: steps.cache-pods.outputs.cache-hit != 'true' + if: github.run_attempt != '1' || steps.cache-pods.outputs.cache-hit != 'true' uses: nick-invision/retry@0711ba3d7808574133d713a0d92d2941be03a350 with: timeout_minutes: 10