The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/.github/actions/setup-node/action.yml

46 lines
1.1 KiB

name: 'Setup Node'
inputs:
node-version:
required: true
type: string
cache-modules:
required: false
type: boolean
install:
required: false
type: boolean
outputs:
node-version:
value: ${{ steps.node-version.outputs.node-version }}
runs:
using: composite
steps:
# - name: Cache Node Modules
# if: inputs.cache-modules
# id: cache-node-modules
# uses: actions/cache@v3
# with:
# path: |
# node_modules
# **/node_modules
# key: node-modules-${{ hashFiles('yarn.lock') }}
#
# Could use this command to list all paths to save:
# find . -name 'node_modules' -prune | grep -v "/\.meteor/" | grep -v "/meteor/packages/"
- name: Use Node.js ${{ inputs.node-version }}
id: node-version
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
cache: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' && 'yarn' || '' }}
- name: yarn install
# if: inputs.install && steps.cache-node-modules.outputs.cache-hit != 'true'
if: inputs.install
shell: bash
run: yarn