Rebuild Global Cache ("next" branch) #266
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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@v4 | |
with: | |
node-version: 22 | |
- 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 | |
cacheDependenciesPackages: | |
name: Cache dependencies and packages | |
needs: constants | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- uses: actions/checkout@v4 | |
with: | |
path: next | |
ref: next | |
- uses: actions/cache@v4 | |
with: | |
path: next/.yarn/cache | |
key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- uses: actions/cache@v4 | |
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:quick | |
working-directory: next | |
runs-on: ubuntu-latest | |
env: | |
NODE_OPTIONS: '--max_old_space_size=4096' | |
YARN_ENABLE_IMMUTABLE_INSTALLS: false |