-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
action.yml
42 lines (40 loc) · 1.11 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: "Turborepo Node.js Setup"
description: "Sets Node.js up for CI"
inputs:
enable-corepack:
description: "Control turning on corepack."
required: false
default: true
extra-flags:
description: "Extra flags to pass to the pnpm install."
required: false
default: ""
runs:
using: "composite"
steps:
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 7.12.1
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
- name: Configure corepack
# Forcibly upgrade our available version of corepack.
# The bundled version in node 16 has known issues.
# Prepends the npm bin dir so that it is always first.
shell: bash
run: |
npm install --force --global corepack@latest
npm config get prefix >> $GITHUB_PATH
corepack enable
- name: Enable corepack
if: ${{ inputs.enable-corepack == 'true' }}
shell: bash
run: |
corepack enable
- name: pnpm install
shell: bash
run: pnpm install ${{ inputs.extra-flags }}