From 27b50407ddb8b5ba9e4e60dd2186f3d9f19c3a53 Mon Sep 17 00:00:00 2001 From: Kilian Finger Date: Sun, 8 Dec 2024 14:12:57 +0100 Subject: [PATCH] ci: fix build cache keys --- .github/actions/setup/action.yml | 2 +- .github/workflows/review-android.yml | 6 +++--- .github/workflows/review-ios.yml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index dbe6bdce6..da31cd0af 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -27,7 +27,7 @@ runs: .yarn/install-state.gz key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }} restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}- ${{ runner.os }}-yarn- - name: Install dependencies diff --git a/.github/workflows/review-android.yml b/.github/workflows/review-android.yml index ac91d7800..c5900a0bf 100644 --- a/.github/workflows/review-android.yml +++ b/.github/workflows/review-android.yml @@ -37,10 +37,10 @@ jobs: ./packages/react-native-app/android/.gradle ./packages/react-native-app/android/app/build ./packages/react-native-app/android/build - key: ${{ runner.os }}-android-build-${{ matrix.new-arch && 'new' || 'old' }}-arch-${{ github.workflow }}-${{ github.sha }} + key: ${{ runner.os }}-android-build-${{ matrix.new-arch && 'new' || 'old' }}-arch-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}-${{ hashFiles('android/**') }} restore-keys: | - ${{ runner.os }}-android-build-${{ matrix.new-arch && 'new' || 'old' }}-arch-${{ github.workflow }}-${{ github.sha }} - ${{ runner.os }}-android-build-${{ matrix.new-arch && 'new' || 'old' }}-arch-${{ github.workflow }}- + ${{ runner.os }}-android-build-${{ matrix.new-arch && 'new' || 'old' }}-arch-${{ hashFiles('yarn.lock') }}- + ${{ runner.os }}-android-build-${{ matrix.new-arch && 'new' || 'old' }}-arch- - name: Build if: steps.android-build-cache.outputs.cache-hit != 'true' diff --git a/.github/workflows/review-ios.yml b/.github/workflows/review-ios.yml index ceb26d90c..d912769c9 100644 --- a/.github/workflows/review-ios.yml +++ b/.github/workflows/review-ios.yml @@ -28,7 +28,7 @@ jobs: path: ./packages/react-native-app/ios/Pods key: ${{ runner.os }}-cocoapods-${{ matrix.new-arch && 'new' || 'old' }}-arch-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }} restore-keys: | - ${{ runner.os }}-cocoapods-${{ matrix.new-arch && 'new' || 'old' }}-arch-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }} + ${{ runner.os }}-cocoapods-${{ matrix.new-arch && 'new' || 'old' }}-arch-${{ hashFiles('yarn.lock') }}- ${{ runner.os }}-cocoapods-${{ matrix.new-arch && 'new' || 'old' }}-arch- - name: Install Cocoapods @@ -39,10 +39,10 @@ jobs: id: ios-build-cache with: path: ./packages/react-native-app/ios/build - key: ${{ runner.os }}-ios-build-${{ matrix.new-arch && 'new' || 'old' }}-arch-${{ github.workflow }}-${{ github.sha }} + key: ${{ runner.os }}-ios-build-${{ matrix.new-arch && 'new' || 'old' }}-arch-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}-${{ hashFiles('ios/**') }} restore-keys: | - ${{ runner.os }}-ios-build-${{ matrix.new-arch && 'new' || 'old' }}-arch-${{ github.workflow }}-${{ github.sha }} - ${{ runner.os }}-ios-build-${{ matrix.new-arch && 'new' || 'old' }}-arch-${{ github.workflow }}- + ${{ runner.os }}-ios-build-${{ matrix.new-arch && 'new' || 'old' }}-arch-${{ hashFiles('yarn.lock') }}- + ${{ runner.os }}-ios-build-${{ matrix.new-arch && 'new' || 'old' }}-arch- - name: Build if: steps.ios-build-cache.outputs.cache-hit != 'true'