2023-09-14 10:30:38 +03:00
|
|
|
name: init-node
|
|
|
|
description: prepare runner for node related tasks
|
2023-09-14 09:54:23 +03:00
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
2024-06-07 15:56:37 +03:00
|
|
|
- uses: pnpm/action-setup@v4
|
2023-09-14 09:54:23 +03:00
|
|
|
name: Install pnpm
|
|
|
|
|
2024-06-07 15:56:37 +03:00
|
|
|
- uses: actions/setup-node@v4
|
2023-09-14 09:54:23 +03:00
|
|
|
name: Setup node
|
|
|
|
with:
|
|
|
|
cache: pnpm
|
2024-06-17 17:27:51 +03:00
|
|
|
node-version-file: '.nvmrc'
|
2023-09-14 09:54:23 +03:00
|
|
|
|
|
|
|
- name: Get pnpm store directory
|
|
|
|
shell: bash
|
2023-09-14 10:05:12 +03:00
|
|
|
run: echo 'STORE_PATH=$(pnpm store path --silent)' >> $GITHUB_ENV
|
2023-09-14 09:54:23 +03:00
|
|
|
|
2024-06-07 15:56:37 +03:00
|
|
|
- uses: actions/cache@v4
|
2023-10-19 15:30:35 +03:00
|
|
|
if: runner.name != 'ScottsMacStudio' # internet in berlin is very slow
|
2023-09-14 09:54:23 +03:00
|
|
|
name: Setup pnpm cache
|
|
|
|
with:
|
|
|
|
path: ${{ env.STORE_PATH }}
|
2024-01-19 20:37:53 +03:00
|
|
|
key: github-client-${{ runner.os }}-pnpm-store
|
2023-09-14 09:54:23 +03:00
|
|
|
|
|
|
|
- name: Git config
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
# This seems the only reliable way of forcing https for forked packages
|
|
|
|
git config --global url."https://".insteadOf git://
|
|
|
|
git config --global url."https://github.com/".insteadOf git@github.com:
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
shell: bash
|
|
|
|
run: pnpm install
|