-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction.yml
56 lines (48 loc) · 1.33 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: init
author: Jesús Leganés-Combarro 'piranna' (http://piranna.github.io)
description: Initialize Github Actions workflow environment
inputs:
node_auth_token:
description: Github NPM token
node-version:
description: Node.js version
ref:
description: commit-ish to checkout
registry-url:
description: NPM registry URL
ssh-private-key:
description: SSH private key
test-reporters:
description: Test reporters to install
runs:
using: composite
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Setup SSH
if: inputs.ssh-private-key
uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ inputs.ssh-private-key }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: ${{ inputs.node-version }}
registry-url: ${{ inputs.registry-url }}
- name: Install dependencies
run: npm ci --verbose
shell: bash
env:
NODE_AUTH_TOKEN: ${{ inputs.node_auth_token }}
- name: Install test reporters
if: inputs.test-reporters
run: npm install --no-save --verbose ${{ inputs.test-reporters }}
shell: bash
env:
NODE_AUTH_TOKEN: ${{ inputs.node_auth_token }}
branding:
color: orange
icon: sunrise