action.yml aktualisiert
This commit is contained in:
+10
-1
@@ -10,12 +10,18 @@
|
|||||||
name: 'Get & Cache Dependencies'
|
name: 'Get & Cache Dependencies'
|
||||||
description: 'Get the Dependencies from the cache for a (npm) Node JS Project or initialize the cache for it'
|
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:
|
inputs:
|
||||||
caching:
|
caching:
|
||||||
description: 'If the cache should be used or not'
|
description: 'If the cache should be used or not'
|
||||||
required: false
|
required: false
|
||||||
default: 'true'
|
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:
|
runs:
|
||||||
using: 'composite' # Must be 'composite' for a custom composite action
|
using: 'composite' # Must be 'composite' for a custom composite action
|
||||||
steps:
|
steps:
|
||||||
@@ -37,6 +43,9 @@ runs:
|
|||||||
path: node_modules
|
path: node_modules
|
||||||
key: deps-node-modules-${{ steps.get-cache-hash.outputs.hash }}
|
key: deps-node-modules-${{ steps.get-cache-hash.outputs.hash }}
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
id: install
|
||||||
if: steps.cache.outputs.cache-hit != 'true' || inputs.caching != 'true'
|
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!
|
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