Skip to content

Commit 7a3c177

Browse files
committed
Make node-version input optional, update README
1 parent 9a98e32 commit 7a3c177

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,29 @@
1-
# (WIP) checkout-node-project
2-
A custom GitHub Action to checkout and initialize a Node project
1+
# `checkout-node-project`
2+
3+
A simple composite GitHub Action to checkout and initialize a Node project.
4+
5+
## Usage
6+
7+
Remove boilerplate to initialize your node project, so you can replace...
8+
9+
```yaml
10+
steps:
11+
- name: Checkout your branch
12+
uses: actions/checkout@v3
13+
14+
- name: Then install Node.js
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: 16.x
18+
19+
- name: Then install dependencies
20+
run: npm ci
21+
```
22+
with...
23+
```yaml
24+
steps:
25+
- name: All above steps in one!
26+
uses: adamhamlin/[email protected]
27+
with:
28+
node-version: 16.x
29+
```

action.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: 'Checkout Node Project'
2-
description: 'Checkout branch, install Node, and run `npm ci`'
2+
description: 'Checkout, install Node, and run `npm ci`'
33

44
inputs:
55
node-version:
6-
description: Nodejs version to install
7-
required: true
6+
description: Node.js version to install
7+
required: false
88
default: 16.x
99

1010
runs:

0 commit comments

Comments
 (0)