hedgedoc/.github/actions/setup-node/action.yml
renovate[bot] 5e236e4906 chore(deps): update actions/setup-node action to v4.0.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-28 22:30:51 +00: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@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn
- name: Set up NodeJS
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ inputs.NODEJS_VERSION }}
- name: Install dependencies
run: yarn install --immutable
working-directory: .
shell: bash