diff --git a/.github/workflows/build_amplify_swift_for_testing.yml b/.github/workflows/build_amplify_swift_for_testing.yml index 53b96d34f8..8199c02fb2 100644 --- a/.github/workflows/build_amplify_swift_for_testing.yml +++ b/.github/workflows/build_amplify_swift_for_testing.yml @@ -36,7 +36,7 @@ jobs: key: amplify-packages-${{ hashFiles('Package.resolved') }} restore-keys: | amplify-packages- - - name: Attempt to restore the build cache + - name: Restore the build cache id: cache-build timeout-minutes: 4 continue-on-error: true @@ -53,11 +53,10 @@ jobs: disable_package_resolution: ${{ steps.cache-packages.outputs.cache-hit }} build_for_testing: true other_flags: '-derivedDataPath Build -clonedSourcePackagesDirPath ~/Library/Developer/Xcode/DerivedData/Amplify' - - name: Save the build cache - uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 - with: - path: ${{ github.workspace }}/Build - key: amplify-iOS-latest-build-main + - name: Enforce a cache update + run: | + CACHE_KEY="amplify-iOS-latest-build-main-$GITHUB_SHA" + echo "CACHE_RESULT=${CACHE_KEY}" >> $GITHUB_ENV build-for-testing-amplify-swift-macOS: runs-on: macos-13