-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
36 lines (34 loc) · 1.12 KB
/
action.yaml
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
name: Setup Monorepo node app
description: Prepare everything needed for a Nodejs app in a monorepo (cache, dependencies, ...)
inputs:
node-version:
description: Nodejs version to use
required: true
default: "20"
working-directory:
description: Directory of the node application in the mono repo
required: true
other-patterns-to-sparse-checkout:
description: Other patterns to sparse checkout
required: false
default: ""
runs:
using: composite
steps:
- shell: bash
run: echo "🤙 Sparse checkout ${{inputs.working-directory}}"
- uses: gogaille/sparse-checkout@v0.1
with:
patterns: ${{inputs.working-directory}} ${{inputs.other-patterns-to-sparse-checkout}}
- shell: bash
run: echo "⚙ Setup node version ${{inputs.node-version}}"
- uses: actions/setup-node@v3
with:
node-version: ${{inputs.node-version}}
- shell: bash
run: echo "📦 Install dependencies"
- shell: bash
name: Install dependencies
run: |
cd ${{inputs.working-directory}}
yarn install --immutable --immutable-cache --mode=skip-build