mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 17:56:30 -05:00
556e891f5a
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
36 lines
995 B
YAML
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@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.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@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
|
with:
|
|
node-version: ${{ inputs.NODEJS_VERSION }}
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
working-directory: .
|
|
shell: bash
|