# 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@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 id: yarn-cache with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-master - name: Set up NodeJS uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 with: node-version: ${{ inputs.NODEJS_VERSION }} - name: Install dependencies run: yarn install --immutable working-directory: . shell: bash