Skip to content

Scheduling infrastructure for absolutely everyone.

chore: Make atoms cache-key more reusable (#26384)

Keith Williamsc7a80abcbac3
diff --git a/.github/workflows/atoms-production-build.yml b/.github/workflows/atoms-production-build.yml
index 6094722d764..b8fc029acce 100644
--- a/.github/workflows/atoms-production-build.yml
+++ b/.github/workflows/atoms-production-build.yml
@@ -20,17 +20,11 @@ jobs:
env:
cache-name: atoms-build
key-1: ${{ hashFiles('yarn.lock') }}
- key-2: ${{ hashFiles('packages/platform/atoms/**.[jt]s', 'packages/platform/atoms/**.[jt]sx', '!**/node_modules') }}
- key-3: ${{ github.event.pull_request.number || github.ref }}
- # Ensures production-build.yml will always be fresh
- key-4: ${{ github.sha }}
+ key-2: ${{ hashFiles('packages/platform/atoms/**.[jt]s', 'packages/platform/atoms/**.[jt]sx', 'packages/platform/atoms/package.json', '!**/node_modules') }}
with:
path: |
**/dist/**
- key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}-${{ env.key-4 }}
- - name: Log Cache Hit
- if: steps.cache-atoms-build.outputs.cache-hit == 'true'
- run: echo "Cache hit for Atoms build. Skipping build."
+ key: ${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}
- name: Run build
if: steps.cache-atoms-build.outputs.cache-hit != 'true'
run: |