Skip to content

Commit ef495d9

Browse files
authored
Update README.md
1 parent 3f9a39f commit ef495d9

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

README.md

+35-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,36 @@
11
# dispatch-and-wait
2-
A GitHub Action that triggers a workflow and waits for it to succeed before proceeding
2+
A GitHub Action that triggers a workflow and waits for it to succeed before proceeding. Largely based off of [Trigger Workflow and Wait](https://github.com/convictional/trigger-workflow-and-wait).
3+
4+
## Arguments
5+
Name | Required | Default | Description
6+
---- | -------- | ------- | -----------
7+
`owner` | true | N/A | Owner of the repo where the workflow is to be triggered.
8+
`repo` | true | N/A | The repo where the workflow is to be triggered.
9+
`token` | true | N/A | An access token with write permissions to `repo`.
10+
`event_type` | true | N/A | The event type parameter to be passed in the repository dispatch request.
11+
`client_payload` | false | `"{}"` | The client payload parameter to be passed in the repository dispatch request. Should be in the format `'{"key1": "value1", "key2": "value2"}'`.
12+
`wait_time` | false | `10` | Time to wait between workflow status checks, in seconds.
13+
`max_time` | false | `60` | Maximum time to wait for the workflow to finish before exiting, in seconds.
14+
15+
## Example usages
16+
Basic use with user-added secret called `ACCESS_TOKEN`:
17+
```
18+
- uses: felixp8/[email protected]
19+
with:
20+
owner: username
21+
repo: reponame
22+
token: ${{ secrets.ACCESS_TOKEN }}
23+
event_type: ping
24+
```
25+
Use with default `GITHUB_TOKEN` and optional inputs:
26+
```
27+
- uses: felixp8/[email protected]
28+
with:
29+
owner: username
30+
repo: reponame
31+
token: ${{ secrets.GITHUB_TOKEN }}
32+
event_type: ping
33+
client_payload: '{"ref": "master"}'
34+
wait_time: 5
35+
max_time: 120
36+
```

0 commit comments

Comments
 (0)