Files
alfresco-ng2-components/.github/actions/setup/action.yml
T
Maurizio Cacace fc224713f2 AAE-11918A - remove travis env var (#8312)
* AAE-11918 - travis_branch env removal

* AAE-11918 - travis_branch env removal

* event_type and travis_pull_request_branch  env removal

* e travis_build_dir, travis_build_number, travis_commit  env removal

* rename scripts path

* remove .travis file

* remove .travis file

* remove .travis file

* just a commit

* trying to fix e2e test

* fix e2e issue

* remove action load travis env

* with action travis env var load

* remove action travis load env vars

* remove action travis load env vars

* remove action travis load env vars

* last check

* test release flow in dry-run

* final check for review

* fix env variables

* fix env variables

* fix env variables

* remove devel flag

* revert renaming action facade

* git mv commit

* git mv commit
2023-02-28 15:36:22 +01:00

62 lines
1.8 KiB
YAML

name: 'Setup'
description: 'Initialize cache, env var load'
inputs:
enable-cache:
description: 'enable caching'
required: false
type: boolean
default: 'true'
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'
runs:
using: "composite"
steps:
- name: install NPM
uses: actions/setup-node@v3
with:
node-version: 14
cache-dependency-path: package-lock.json
- name: get latest tag sha
id: tag-sha
uses: Alfresco/alfresco-build-tools/.github/actions/git-latest-tag@v1.29.0
# CACHE
- name: Node Modules cache
id: node-modules-cache
if: ${{ inputs.enable-node-modules-cache == 'true' }}
uses: actions/cache@v3
env:
cache-name: node-modules-cache
with:
path: |
node_modules
key: .npm-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
node_modules-${{ runner.os }}-build-${{ env.cache-name }}-
node_modules-${{ runner.os }}-build-
node_modules-${{ runner.os }}-
- name: pip cache
uses: actions/cache@v3
if: ${{ inputs.enable-cache == 'true' }}
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-
restore-keys: |
${{ runner.os }}
- name: load "NPM TAG"
uses: ./.github/actions/set-npm-tag
- name: before install script
uses: ./.github/actions/before-install
with:
act: ${{ inputs.act }}
- name: link nx executable
run: sudo ln -s $(npm bin)/nx /usr/bin/nx
shell: bash