mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-22 03:05:19 -04:00
refactor(ci): restructure workflows
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
cad64b4b1a
commit
b7dcd43d9d
4 changed files with 111 additions and 65 deletions
36
.github/actions/setup-node/action.yml
vendored
Normal file
36
.github/actions/setup-node/action.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
# 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 cache dir)" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
- name: Cache yarn cache
|
||||
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
|
||||
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@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
|
||||
with:
|
||||
node-version: ${{ inputs.NODEJS_VERSION }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile --prefer-offline
|
||||
working-directory: .
|
||||
shell: bash
|
Loading…
Add table
Add a link
Reference in a new issue