-
Notifications
You must be signed in to change notification settings - Fork 6
40 lines (35 loc) · 1.04 KB
/
populate-caches.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
name: Populate dependencies for PRs
# Controls when the action will run.
on:
push:
branches: [ develop ]
jobs:
install:
name: Install dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup app dependencies
uses: actions/setup-node@v3
with:
node-version: '16.19.1'
- name: Cache npm cache
uses: actions/cache@v3
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: |
~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
${{ runner.os }}-npm-
- name: Cache node_modules
id: cache-npm
uses: actions/cache@v3
with:
path: |
node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: npm ci
run: npm ci