Files
alfresco-ng2-components/.github/actions/setup/action.yml
dependabot[bot] bda12d5105 build(deps): bump Alfresco/alfresco-build-tools from 15.12.0 to 15.12.1 in /.github/actions/setup (#11774)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 10:15:17 +02:00

51 lines
1.6 KiB
YAML

name: 'Setup'
description: 'Initialize cache, env var load'
inputs:
enable-node-modules-cache:
description: 'enable caching for node modules'
required: false
type: boolean
default: 'true'
act:
description: 'enable act debug'
required: false
type: boolean
default: 'false'
outputs:
npm-tag:
description: 'NPM tag'
value: ${{ steps.set-npm-tag.outputs.npm-tag }}
runs:
using: "composite"
steps:
- name: install NPM
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
cache-dependency-path: package-lock.json
- name: get latest tag sha
id: tag-sha
uses: Alfresco/alfresco-build-tools/.github/actions/git-latest-tag@661ab6a0d23f6a269da039831907cffad37cc061 # v15.12.1
# CACHE
- name: Node Modules cache
id: node-modules-cache
if: ${{ inputs.enable-node-modules-cache == 'true' }}
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
env:
cache-name: node-modules-cache
with:
path: |
node_modules
key: .npm-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
.npm-${{ runner.os }}-build-${{ env.cache-name }}-
.npm-${{ runner.os }}-build-
.npm-${{ runner.os }}-
- name: load "NPM TAG"
id: set-npm-tag
uses: ./.github/actions/set-npm-tag
- name: before install script
uses: ./.github/actions/before-install
with:
act: ${{ inputs.act }}