Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/actions/npm-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ inputs:
description: 'Path for package-lock.json'
required: false
default: '**/package-lock.json'
outputs:
cache-hit:
description: 'A boolean value to indicate an exact match was found for the primary key'
value: ${{ steps.cache.outputs.cache-hit }}
runs:
using: 'composite'
steps:
- uses: actions/cache@v3
id: 'npm-cache' # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
id: 'cache'
with:
path: ${{ inputs.nodeModulesPath }}
key: ${{ runner.os }}-node-${{ hashFiles(inputs.packageLockPath) }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/00-init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
- name: ⬇ Checkout repo
uses: actions/checkout@v3

- name: 🔄 Init Cache
uses: ./.github/actions/npm-cache
id: 'npm-cache' # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'

- name: 📥 Download deps default-npm-cache
if: steps.npm-cache.outputs.cache-hit != 'true'
uses: bahmutov/npm-install@v1
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ jobs:
with:
languages: ${{ matrix.language }}

- name: 📥 Download deps default-npm-cache
if: steps.npm-cache.outputs.cache-hit != 'true'
uses: bahmutov/npm-install@v1
with:
install-command: npm ci --ignore-scripts

- name: Autobuild
uses: github/codeql-action/autobuild@v1

Expand Down
Loading