-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
52 lines (42 loc) · 1.63 KB
/
action.yml
File metadata and controls
52 lines (42 loc) · 1.63 KB
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
43
44
45
46
47
48
49
50
51
52
name: Setup JavaScript
description: Setup JavaScript environment
inputs:
persist-credentials:
description: Whether to configure the token or SSH key with the local git config
default: 'false'
fetch-all:
description: Whether to fetch all history for all branches and tags.
default: 'false'
node-version:
description: 'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.'
default: 'lts/*'
auto-install:
description: Whether to automatically install dependencies.
default: 'true'
package-manager:
description: 'Package manager to use. Examples: npm, yarn, pnpm.'
default: pnpm
no-frozen-lockfile:
description: Whether to disable frozen lockfile installation.
default: 'false'
runs:
using: composite
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: ${{ inputs.persist-credentials }}
fetch-depth: "${{ inputs.fetch-all == 'true' && '0' || '1' }}"
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
if: ${{ inputs.package-manager == 'pnpm' }}
- name: Setup node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: ${{ inputs.node-version }}
cache: ${{ inputs.package-manager }}
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
shell: bash
run: ${{ inputs.package-manager }} install ${{ inputs.no-frozen-lockfile == 'true' && '--no-frozen-lockfile' || '' }}
if: ${{ inputs.auto-install }}