-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
name: 'Get & Cache Dependencies' | ||
description: 'Get the dependencies (via npm) and cache them.' | ||
# DKDK add inputs | ||
inputs: | ||
caching: | ||
description: 'Whether to cache dependencies or not.' | ||
required: false | ||
default: 'true' | ||
runs: | ||
# DKDK custom composite action | ||
using: 'composite' | ||
steps: | ||
- name: Cache dependencies | ||
if: inputs.caching == 'true' | ||
id: cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: deps-node-modules-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
if: steps.cache.outputs.cache-hit != 'true' && inputs.caching != 'true' | ||
run: npm ci | ||
# DKDK shell: bash is required for custom composite action | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters