Skip to content

Rebuild Global Cache ("next" branch) #249

Rebuild Global Cache ("next" branch)

Rebuild Global Cache ("next" branch) #249

# 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: 20
- 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: 20
- 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