Files
actions-custom-composite/action.yml
T
tom.coursow 682aa7b9e0
Deployment / lint (push) Successful in 54s
Deployment / test (push) Successful in 1m0s
Deployment / build (push) Successful in 1m5s
Deployment / deploy (push) Successful in 12s
action.yml aktualisiert
2023-07-27 17:32:57 +02:00

32 lines
1.2 KiB
YAML

#
# To be able to use this action (with Gitea and Act Runner),
# this action.yml file has to be placed in the root of the repository.
# It is also important that a Git TAG is created (for example 'v1')
# Then workflows can use this action like this:
# 'using: https://gitea.coursow.de/Test-Playground/actions-custom-composite@v1'
#
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!