Unverified Commit 4a8a3d24 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update CI cache key to allow re-running only failed (#36249)

Previously we made the cache key specific to each run attempt to allow having a separate cache in case a previous build cache was incorrect but now that actions allow re-running only failed it seems more beneficial to allow re-using the build cache for the re-run and for cases where the build cache is incorrect a `bump` commit can be done instead. 
parent 562e4283
...@@ -68,7 +68,7 @@ jobs: ...@@ -68,7 +68,7 @@ jobs:
id: cache-build id: cache-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
...@@ -84,7 +84,7 @@ jobs: ...@@ -84,7 +84,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- run: ./scripts/check-manifests.js - run: ./scripts/check-manifests.js
- run: yarn lint - run: yarn lint
...@@ -119,7 +119,7 @@ jobs: ...@@ -119,7 +119,7 @@ jobs:
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- name: Check - name: Check
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -157,7 +157,7 @@ jobs: ...@@ -157,7 +157,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- run: rm -rf .git && mv .git-bak .git - run: rm -rf .git && mv .git-bak .git
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -190,7 +190,7 @@ jobs: ...@@ -190,7 +190,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -230,7 +230,7 @@ jobs: ...@@ -230,7 +230,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -281,7 +281,7 @@ jobs: ...@@ -281,7 +281,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -335,7 +335,7 @@ jobs: ...@@ -335,7 +335,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -386,7 +386,7 @@ jobs: ...@@ -386,7 +386,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -440,7 +440,7 @@ jobs: ...@@ -440,7 +440,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -481,7 +481,7 @@ jobs: ...@@ -481,7 +481,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -525,7 +525,7 @@ jobs: ...@@ -525,7 +525,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -566,7 +566,7 @@ jobs: ...@@ -566,7 +566,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -611,7 +611,7 @@ jobs: ...@@ -611,7 +611,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: pnpm/action-setup@v2.2.1 - uses: pnpm/action-setup@v2.2.1
with: with:
...@@ -659,7 +659,7 @@ jobs: ...@@ -659,7 +659,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -709,7 +709,7 @@ jobs: ...@@ -709,7 +709,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with: with:
...@@ -751,7 +751,7 @@ jobs: ...@@ -751,7 +751,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -795,7 +795,7 @@ jobs: ...@@ -795,7 +795,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -828,7 +828,7 @@ jobs: ...@@ -828,7 +828,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with: with:
...@@ -864,7 +864,7 @@ jobs: ...@@ -864,7 +864,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
with: with:
...@@ -894,7 +894,7 @@ jobs: ...@@ -894,7 +894,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
with: with:
...@@ -1284,7 +1284,7 @@ jobs: ...@@ -1284,7 +1284,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- name: Setup node - name: Setup node
uses: actions/setup-node@v2 uses: actions/setup-node@v2
...@@ -1336,7 +1336,7 @@ jobs: ...@@ -1336,7 +1336,7 @@ jobs:
id: restore-build id: restore-build
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- name: Setup node - name: Setup node
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -1413,7 +1413,7 @@ jobs: ...@@ -1413,7 +1413,7 @@ jobs:
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with: with:
path: ./* path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} key: ${{ github.sha }}-${{ github.run_number }}
- name: Set Git Short sha Env - name: Set Git Short sha Env
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment