Skip to content

Commit 27832ef

Browse files
authored
add workflow example to Readme (#19)
1 parent 45b8bee commit 27832ef

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1+
name: Yarn Lock Changes
12
on: [pull_request]
23

34
jobs:
4-
test_action:
5+
check:
56
runs-on: ubuntu-latest
6-
name: Yarn Lock Changes
77
steps:
88
- name: Checkout
99
uses: actions/checkout@v2
1010
- name: Yarn Lock Changes
1111
uses: ./
1212
with:
13-
path: 'yarn.lock'
1413
token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ Creates a comment inside Pull Request with the human-readable summary of the cha
99
# for now, use `main` before the stable release will be published as `v1`
1010
uses: Simek/yarn-lock-changes@main
1111
with:
12-
path: 'yarn.lock'
1312
token: ${{ secrets.GITHUB_TOKEN }}
1413
```
1514
16-
## Inputs
15+
### Inputs
1716
1817
| Input | Required | Default | Description |
1918
| --- | :---: | :---: | --- |
@@ -22,6 +21,29 @@ Creates a comment inside Pull Request with the human-readable summary of the cha
2221
| `token` | **Yes** | - | GitHub token for the bot, so it can publish a comment in the pull request. |
2322
| `updateComment` | No | `'true'` | Should the bot update the summary comment. If value is `'false'`, bot will post a new comment on each new commit. |
2423

24+
### Workflow Example
25+
26+
Example below includes all the optional inputs for the action (set to their default values), if you are happy with generated output, it's safe to remove all of them (besides required `token`).
27+
28+
```yml
29+
name: Yarn Lock Changes
30+
on: [pull_request]
31+
32+
jobs:
33+
check:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v2
38+
- name: Yarn Lock Changes
39+
uses: Simek/yarn-lock-changes@main
40+
with:
41+
collapsibleThreshold: '25'
42+
path: 'yarn.lock'
43+
token: ${{ secrets.GITHUB_TOKEN }}
44+
updateComment: 'true'
45+
```
46+
2547
## Preview
2648

2749
### Short list of changes

0 commit comments

Comments
 (0)