-
Notifications
You must be signed in to change notification settings - Fork 614
56 lines (56 loc) · 1.8 KB
/
rebuildGlobalCacheDev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# 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 ("dev" 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=dev-${{ 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: dev
ref: dev
- uses: actions/cache@v4
with:
path: dev/.yarn/cache
key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- uses: actions/cache@v4
with:
path: dev/.webiny/cached-packages
key: ${{ needs.constants.outputs.global-cache-key }}
- name: Install dependencies
run: yarn --immutable
working-directory: dev
- name: Build packages
run: yarn build:quick
working-directory: dev
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: false