cal.pub0.org/.github/actions/yarn-install/action.yml

27 lines
885 B
YAML
Raw Normal View History

2023-02-20 21:51:46 +00:00
name: Yarn install
description: "Install all NPM dependencies, caches them and restores if necessary"
inputs:
node_version:
required: true
2023-02-20 22:26:51 +00:00
description: "The node version used to run this"
2023-02-20 21:51:46 +00:00
runs:
using: "composite"
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node_version }}
- name: node_modules cache
id: node-modules-cache
uses: actions/cache@v3
env:
cache-name: node-modules-yarn
cache-key: ${{ inputs.node_version }}-${{ hashFiles('yarn.lock') }}
with:
path: node_modules
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.cache-key }}
restore-keys: ${{ runner.os }}-${{ env.cache-name }}-
- name: Yarn install
2023-02-20 21:56:51 +00:00
shell: bash
2023-02-20 21:51:46 +00:00
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: yarn install --prefer-offline --frozen-lockfile