# This file was automatically generated by github-actions-wac. # DO NOT MODIFY IT BY HAND. Instead, modify the source *.wac.ts file(s) # and run "github-actions-wac build" (or "ghawac build") to regenerate this file. # For more information, run "github-actions-wac --help". name: Rebuild Global Cache ("next" branch) 'on': workflow_dispatch: {} schedule: - cron: 0 4 * * * jobs: constants: name: Create constants outputs: global-cache-key: ${{ steps.global-cache-key.outputs.global-cache-key }} steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - name: Create global cache key id: global-cache-key run: >- echo "global-cache-key=next-${{ runner.os }}-$(/bin/date -u "+%m%d")-${{ vars.RANDOM_CACHE_KEY_SUFFIX }}" >> $GITHUB_OUTPUT runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write cacheDependenciesPackages: name: Cache dependencies and packages needs: constants steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: next ref: next - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: next run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: next/.webiny/cached-packages key: ${{ needs.constants.outputs.global-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: next - name: Build packages run: yarn build working-directory: next - name: Upload build cache artifact uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: build-cache retention-days: 1 include-hidden-files: true path: next/.webiny/cached-packages - name: Upload yarn cache artifact uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: yarn-cache retention-days: 1 include-hidden-files: true path: next/.yarn/cache - name: Upload packages artifact uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: packages retention-days: 1 include-hidden-files: true path: next/packages runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write