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

This commit is contained in:
Keith Williams
2026-01-02 02:48:04 +00:00
committed by GitHub
parent 20c67ef101
commit c7a80abcba
+2 -8
View File
@@ -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: |