diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 6f2112d3e40ca..092eb5dff56a5 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -66,7 +66,7 @@ jobs: id: cache-build with: path: ./* - key: ${{ github.sha }}-${{ github.run_number }} + key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt}} # Build binaries for publishing build-native: @@ -419,7 +419,12 @@ jobs: id: restore-build with: path: ./* - key: ${{ github.sha }}-${{ github.run_number }} + # Cache includes repo checkout which is required for later scripts + fail-on-cache-miss: true + key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} + restore-keys: | + ${{ github.sha }}-${{ github.run_number }} + ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt}} - uses: actions/download-artifact@v4 with: @@ -467,7 +472,12 @@ jobs: id: restore-build with: path: ./* - key: ${{ github.sha }}-${{ github.run_number }} + # Cache includes repo checkout which is required for later scripts + fail-on-cache-miss: true + key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} + restore-keys: | + ${{ github.sha }}-${{ github.run_number }} + ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt}} - uses: actions/download-artifact@v4 with: