@@ -2,10 +2,10 @@ name: Update Main Cache
2
2
3
3
# This workflow is responsible for maintaining an updated cache of node_modules on the 'main' branch.
4
4
# It's triggered on every push to the 'main' branch. It checks out the code, sets up Node.js, and caches
5
- # the node_modules folder, using a key that is specific to the 'main' branch and the hash of the 'yarn. lock' file.
6
- # If the 'yarn. lock' file has not changed since the last push to 'main', the existing cache will be reused.
7
- # If the 'yarn. lock' file has changed, a new cache will be created. This ensures that the cache is always
8
- # up-to-date with the latest dependencies defined in 'yarn. lock'. This cache can then be used by workflows
5
+ # the node_modules folder, using a key that is specific to the 'main' branch and the hash of the 'package- lock.json ' file.
6
+ # If the 'package- lock.json ' file has not changed since the last push to 'main', the existing cache will be reused.
7
+ # If the 'package- lock.json ' file has changed, a new cache will be created. This ensures that the cache is always
8
+ # up-to-date with the latest dependencies defined in 'package- lock.json '. This cache can then be used by workflows
9
9
# in pull requests to speed up the build process by reusing the installed dependencies.
10
10
11
11
on :
33
33
uses : actions/setup-node@v3
34
34
with :
35
35
node-version : ${{ matrix.node-version }}
36
- cache : ' yarn '
36
+ cache : ' npm '
37
37
38
38
# Cache node_modules to speed up future builds
39
39
- name : Cache node modules
@@ -43,12 +43,12 @@ jobs:
43
43
cache-name : cache-node-modules
44
44
with :
45
45
path : node_modules
46
- key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn. lock', '**/package.json') }}
46
+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package- lock.json ', '**/package.json') }}
47
47
restore-keys : |
48
48
${{ runner.os }}-build-${{ env.cache-name }}-
49
49
${{ runner.os }}-build-
50
50
${{ runner.os }}-
51
51
52
52
# Install dependencies to update the cache
53
53
- name : Install Dependencies
54
- run : yarn install --frozen-lockfile
54
+ run : npm ci
0 commit comments