Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
ci: add step to save cache
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-deriv committed Oct 6, 2023
1 parent 50299e0 commit 7bd1f9f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/actions/invalidate_master_cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: invalidate_npm_cache
description: Invalidate the Master NPM cache
runs:
using: composite
steps:
- name: save_cache
uses: actions/cache/save@v3
with:
path: |-
node_modules
key: ${{ build-master-cache-${{ hashFiles('./package-lock.json') }}
2 changes: 1 addition & 1 deletion .github/actions/npm_install_from_cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runs:
id: cache-nodemodules
uses: actions/cache/restore@v3
with:
key: v1-deps-{{ checksum "package-lock.json" }}
key: ${{ build-master-cache-${{ hashFiles('./package-lock.json') }}
path: node_modules
- name: Install npm dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
uses: ./.github/actions/setup_node
- name: Install Dependencies
uses: ./.github/actions/npm_install_from_cache
- name: Invalidate Cache
uses: ./.github/actions/invalidate_master_cache
- name: Build
uses: ./.github/actions/build
with:
Expand Down

0 comments on commit 7bd1f9f

Please sign in to comment.