@@ -29,16 +29,16 @@ jobs:
29
29
path : " ./node_modules"
30
30
# Use the combo between node version, name, and SHA-256 hash of the lock file as cache key so that
31
31
# if one of them changes the cache is invalidated/discarded
32
- key : ${{ matrix.version }}-cache-utils -node-modules-${{ hashFiles('./package-lock.json') }}
32
+ key : ${{ matrix.version }}-cache-utilities -node-modules-${{ hashFiles('./package-lock.json') }}
33
33
- name : Install dependencies
34
- # We can skip the install if there was a cache hit
34
+ # We can skip the installation if there was a cache hit
35
35
if : steps.cache-node-modules.outputs.cache-hit != 'true'
36
36
# See https://github.com/npm/cli/issues/4475 to see why --foreground-scripts
37
37
run : npm ci --foreground-scripts
38
38
- name : Build packages
39
39
# If there's a cache hit we still need to manually build the packages
40
40
# this would otherwise have been done automatically as a part of the
41
- # postinstall npm hook
41
+ # post-install npm hook
42
42
if : steps.cache-node-modules.outputs.cache-hit == 'true'
43
43
run : |
44
44
npm run build -w packages/commons
67
67
id : cache-node-modules
68
68
uses : actions/cache@v3
69
69
with :
70
- path : " ./examples/${{ matrix.example }}/node_modules"
71
- # Use the combo between example, name, and SHA-256 hash of all example lock files as cache key.
72
- # It's not possible to use the ${{ matrix.example }} key in the hashFiles fn so
73
- # if any of the lock files (which should be fairly similar anyway) changes the cache is
74
- # invalidated/discarded for all.
75
- key : ${{ matrix.example }}-cache-examples-node-modules-${{ hashFiles('./examples/*/package-lock.json') }}
70
+ path : " ./node_modules"
71
+ key : cache-node-modules-${{ hashFiles('./package-lock.json') }}
76
72
- name : Install dependencies
77
73
# We can skip the installation if there was a cache hit
78
74
if : steps.cache-node-modules.outputs.cache-hit != 'true'
97
93
id : cache-node-modules
98
94
uses : actions/cache@v3
99
95
with :
100
- path : " ./layer-publisher/node_modules"
101
- # Use the combo between example, name, and SHA-256 hash of the layer-publisher lock files as cache key.
102
- key : cache-layer-publisher-node-modules-${{ hashFiles('./layer-publisher/*/package-lock.json') }}
96
+ path : " ./node_modules"
97
+ key : cache-node-modules-${{ hashFiles('./package-lock.json') }}
103
98
- name : Install Layer publisher
104
99
# We can skip the installation if there was a cache hit
105
100
if : steps.cache-node-modules.outputs.cache-hit != 'true'
0 commit comments