Scheduling infrastructure for absolutely everyone.
chore: restore production build cache with stable key using actions/cache (#26276)
Keith Williamse4b0a1b94107
diff --git a/.github/actions/cache-build/action.yml b/.github/actions/cache-build/action.ymlindex b5e1fe47f86..d3445a489ac 100644--- a/.github/actions/cache-build/action.yml+++ b/.github/actions/cache-build/action.yml@@ -7,7 +7,27 @@ inputs:runs:using: "composite"steps:+ - name: Cache production build+ uses: actions/cache@v4+ id: cache-build+ env:+ cache-name: prod-build+ # Use branch name for cache scoping (head_ref for PRs, ref_name for pushes)+ branch-key: ${{ github.head_ref || github.ref_name }}+ # Hash yarn.lock for dependency changes+ lockfile-hash: ${{ hashFiles('yarn.lock') }}+ # Hash source files that affect the web build, excluding generated directories+ # Excludes packages/prisma/{generated,client,zod}/* and packages/kysely/* which are generated by prisma generate+ source-hash: ${{ hashFiles('apps/**/**.[jt]s', 'apps/**/**.[jt]sx', 'apps/**/*.json', 'apps/**/*.css', 'packages/**/**.[jt]s', 'packages/**/**.[jt]sx', 'packages/prisma/schema.prisma', 'packages/prisma/migrations/**/*.sql', '!**/node_modules/**', '!packages/prisma/generated/**', '!packages/prisma/client/**', '!packages/prisma/zod/**', '!packages/kysely/**') }}+ with:+ path: |+ ${{ github.workspace }}/apps/web/.next+ ${{ github.workspace }}/apps/web/public/embed+ **/.turbo/**+ **/dist/**+ key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.node_version }}-${{ env.branch-key }}-${{ env.lockfile-hash }}-${{ env.source-hash }}- run: |export NODE_OPTIONS="--max_old_space_size=8192"yarn build+ if: steps.cache-build.outputs.cache-hit != 'true'shell: bash