action.yml aktualisiert
This commit is contained in:
+10
-1
@@ -10,12 +10,18 @@
|
||||
name: 'Get & Cache Dependencies'
|
||||
description: 'Get the Dependencies from the cache for a (npm) Node JS Project or initialize the cache for it'
|
||||
|
||||
# Inputs can be given with the 'with:' key later when using the custom action
|
||||
inputs:
|
||||
caching:
|
||||
description: 'If the cache should be used or not'
|
||||
required: false
|
||||
default: 'true'
|
||||
|
||||
outputs:
|
||||
cache-hit:
|
||||
description: 'Provides information if the cache was used during the action execution (true) or not (false)'
|
||||
value: ${{ steps.install.outputs.cache-hit }}
|
||||
|
||||
runs:
|
||||
using: 'composite' # Must be 'composite' for a custom composite action
|
||||
steps:
|
||||
@@ -37,6 +43,9 @@ runs:
|
||||
path: node_modules
|
||||
key: deps-node-modules-${{ steps.get-cache-hash.outputs.hash }}
|
||||
- name: Install dependencies
|
||||
id: install
|
||||
if: steps.cache.outputs.cache-hit != 'true' || inputs.caching != 'true'
|
||||
run: npm ci
|
||||
run: |
|
||||
npm ci
|
||||
echo "cache-hit='true'" >> $GITHUB_OUTPUT
|
||||
shell: bash # compared to workflow ymls... Action ymls require the 'shell' property when a 'run' property was used!
|
||||
Reference in New Issue
Block a user