Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit e078a6c

Browse files
authored
Merge pull request #2 from Khan/jaredly-patch-1
Update Readme.md
2 parents 1b2581b + 9d3aa1f commit e078a6c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Readme.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,31 @@
33
Look for a "trigger word" in a pull-request description or comment, so that later actions can know whether or not to run.
44

55
This is most useful in tandem with [workflow-preprocessor], so that you don't have to be writing a ton of `if`s all down the line.
6+
7+
## Example usage in workflow
8+
9+
Your workflow needs to listen to the following events:
10+
```
11+
on:
12+
pull_request:
13+
types: [opened]
14+
issue_comment:
15+
types: [created]
16+
```
17+
18+
And then you can use the action in your jobs like this:
19+
20+
```
21+
jobs:
22+
do_some_work:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: khan/pull-request-comment-trigger@master
26+
id: check
27+
with:
28+
trigger: '@hello/world'
29+
env:
30+
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
31+
- run: 'echo Found it!'
32+
if: steps.check.outputs.triggered == 'true'
33+
```

0 commit comments

Comments
 (0)