Files
actions-custom-composite/action.yml
T
tom.coursow ca61b347e7
Deployment / lint (push) Failing after 11s
Deployment / test (push) Failing after 8s
Deployment / build (push) Has been skipped
Deployment / deploy (push) Has been skipped
action.yml hinzugefügt
2023-07-27 16:32:07 +02:00

24 lines
908 B
YAML

name: 'Get & Cache Dependencies'
description: 'Get the Dependencies from the cache for a (npm) Node JS Project or initialize the cache for it'
runs:
using: 'composite' # Must be 'composite' for a custom composite action
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.20'
- uses: actions/go-hashfiles@v0.0.1
id: get-cache-hash
with:
patterns: |-
**/package-lock.json
- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: node_modules
key: deps-node-modules-${{ steps.get-cache-hash.outputs.hash }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
shell: bash # compared to workflow ymls... Action ymls require the 'shell' property when a 'run' property was used!