Skip to content

Commit e508b15

Browse files
Merge branch 'main' into feature/WorkflowReusable
2 parents 82e5b6b + 52c84d7 commit e508b15

2 files changed

Lines changed: 29 additions & 2 deletions

File tree

.github/workflows/cache-node.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Cache Node Workflow
2+
on: workflow_dispatch
3+
permissions:
4+
contents: write
5+
jobs:
6+
cache-setup:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
- name: Cache Node Modules
12+
id: cache-npm
13+
uses: actions/cache@v4
14+
env:
15+
cache-name: cache-node-modules
16+
with:
17+
path: node_modules
18+
key: ${{ runner.os }}-${{env.cache-name}}-${{ hashFiles('package-lock.json') }}
19+
restore-keys: |
20+
${{ runner.os }}-${{env.cache-name}}-
21+
${{ runner.os }}-
22+
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
23+
name: List the state of node modules
24+
continue-on-error: true
25+
run: npm list
26+
- name: Install Dependencies
27+
run: npm install

.github/workflows/cache.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Cache Workflow
1+
name: Cache NPM Workflow
22
on: workflow_dispatch
33
permissions:
44
contents: write
@@ -15,7 +15,7 @@ jobs:
1515
cache-name: cache-npm
1616
with:
1717
path: ~/.npm
18-
key: ${{ runner.os }}-${{env.cache-name}}-${{ hashFiles('**/package-lock.json') }}
18+
key: ${{ runner.os }}-${{env.cache-name}}-${{ hashFiles('package-lock.json') }}
1919
restore-keys: |
2020
${{ runner.os }}-${{env.cache-name}}-
2121
${{ runner.os }}-

0 commit comments

Comments
 (0)