Skip to content

Commit a6590e7

Browse files
authored
[GHA] Add node module caching to bonk workflows (#29182)
1 parent 5829443 commit a6590e7

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.github/workflows/bigbonk.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,16 @@ jobs:
3434
node-version-file: "package.json"
3535
cache: "npm"
3636

37-
- name: Install dependencies
37+
- name: Restore node_modules (cache hit)
38+
id: node-modules-cache
39+
uses: actions/cache@v5
40+
with:
41+
path: node_modules
42+
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
43+
44+
- name: Install node_modules (cache miss)
3845
run: npm ci
46+
if: steps.node-modules-cache.outputs.cache-hit != 'true'
3947

4048
- name: Run Bonk
4149
uses: ask-bonk/ask-bonk/github@main

.github/workflows/bonk.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,16 @@ jobs:
3535
node-version-file: "package.json"
3636
cache: "npm"
3737

38-
- name: Install dependencies
38+
- name: Restore node_modules (cache hit)
39+
id: node-modules-cache
40+
uses: actions/cache@v5
41+
with:
42+
path: node_modules
43+
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
44+
45+
- name: Install node_modules (cache miss)
3946
run: npm ci
47+
if: steps.node-modules-cache.outputs.cache-hit != 'true'
4048

4149
- name: Run Lil Bonk
4250
uses: ask-bonk/ask-bonk/github@main

0 commit comments

Comments
 (0)