Skip to content

Commit 86bb59e

Browse files
authored
ci: give each workflow a unique setup cache key (#5217)
Checks, publish_core_react, publish_data_grid, publish_lab and publish_storybook all passed the bare commit SHA as the _setup.yml cache key while checking out different sparse paths. Caches are immutable, so when two of these workflows ran on the same push the first save won and the others restored a workspace with the wrong file set — on push 1243030 the Checks job restored the storybook variant (no documentation/) and the AI component index freshness check failed reporting every component missing. Suffix the key per workflow, matching the pattern publish_icons (-setup-icons) and publish_tokens (-setup-tokens) already use. Fixes #5214
1 parent 1243030 commit 86bb59e

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/checks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: ./.github/workflows/_setup.yml
2222
secrets: inherit
2323
with:
24-
cacheKey: ${{ github.sha }}
24+
cacheKey: ${{ github.sha }}-setup-checks
2525
checkout_paths: packages apps scripts .github documentation
2626
packages:
2727
name: Process packages
@@ -35,7 +35,7 @@ jobs:
3535
path: |
3636
./*
3737
~/.pnpm-store
38-
key: ${{ github.sha }}
38+
key: ${{ github.sha }}-setup-checks
3939
- name: Fallback checkout (cache miss)
4040
if: steps.setup-cache.outputs.cache-hit != 'true'
4141
uses: actions/checkout@v7

.github/workflows/publish_core_react.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
uses: ./.github/workflows/_setup.yml
3131
secrets: inherit
3232
with:
33-
cacheKey: ${{ github.sha }}
33+
cacheKey: ${{ github.sha }}-setup-core-react
3434
checkout_paths: packages scripts
3535
tag: ${{ github.event.inputs.npm-tag }}
3636
packages:
@@ -45,7 +45,7 @@ jobs:
4545
path: |
4646
./*
4747
~/.pnpm-store
48-
key: ${{ github.sha }}
48+
key: ${{ github.sha }}-setup-core-react
4949
- name: Use "dist" cache
5050
id: dist-cache
5151
uses: actions/cache@v6

.github/workflows/publish_data_grid.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: ./.github/workflows/_setup.yml
3030
secrets: inherit
3131
with:
32-
cacheKey: ${{ github.sha }}
32+
cacheKey: ${{ github.sha }}-setup-data-grid
3333
checkout_paths: packages scripts
3434
tag: ${{ github.event.inputs.npm-tag }}
3535
packages:
@@ -44,7 +44,7 @@ jobs:
4444
path: |
4545
./*
4646
~/.pnpm-store
47-
key: ${{ github.sha }}
47+
key: ${{ github.sha }}-setup-data-grid
4848
- name: Use "dist" cache
4949
id: dist-cache
5050
uses: actions/cache@v6

.github/workflows/publish_lab.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: ./.github/workflows/_setup.yml
3030
secrets: inherit
3131
with:
32-
cacheKey: ${{ github.sha }}
32+
cacheKey: ${{ github.sha }}-setup-lab
3333
checkout_paths: packages scripts
3434
tag: ${{ github.event.inputs.npm-tag }}
3535
packages:
@@ -44,7 +44,7 @@ jobs:
4444
path: |
4545
./*
4646
~/.pnpm-store
47-
key: ${{ github.sha }}
47+
key: ${{ github.sha }}-setup-lab
4848
- name: Use "dist" cache
4949
id: dist-cache
5050
uses: actions/cache@v6

.github/workflows/publish_storybook.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: ./.github/workflows/_setup.yml
2929
secrets: inherit
3030
with:
31-
cacheKey: ${{ github.sha }}
31+
cacheKey: ${{ github.sha }}-setup-storybook
3232
checkout_paths: packages apps scripts
3333
packages:
3434
name: Process packages
@@ -42,7 +42,7 @@ jobs:
4242
path: |
4343
./*
4444
~/.pnpm-store
45-
key: ${{ github.sha }}
45+
key: ${{ github.sha }}-setup-storybook
4646
- name: Install Node.js
4747
uses: actions/setup-node@v7
4848
with:

0 commit comments

Comments
 (0)