hedgedoc/.github/actions/setup-node/action.yml
renovate[bot] 1dfd609b2d chore(deps): update actions/cache action to v3.2.6
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-02-25 13:46:22 +01:00

36 lines
995 B
YAML

# SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
#
# SPDX-License-Identifier: AGPL-3.0-only
name: Setup Node
description: "Setups node and configures the cache"
inputs:
NODEJS_VERSION:
required: true
description: "NodeJS version to install"
runs:
using: "composite"
steps:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash
- name: Cache yarn cache
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn
- name: Set up NodeJS
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: ${{ inputs.NODEJS_VERSION }}
- name: Install dependencies
run: yarn install --immutable
working-directory: .
shell: bash