Skip to content

Commit

Permalink
Add Node.js caching to workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoerdbeentjes committed Oct 4, 2024
1 parent 401d8ad commit 48c721e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/main-migrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ jobs:
with:
fetch-depth: 0

- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Check for changes in migrations folder
id: check_changes
run: |
Expand Down Expand Up @@ -51,6 +59,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Set up Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -76,6 +92,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Set up Node.js
uses: actions/setup-node@v4
with:
Expand Down

0 comments on commit 48c721e

Please sign in to comment.