Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
felixp8 authored Aug 24, 2020
1 parent 3f9a39f commit ef495d9
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
# dispatch-and-wait
A GitHub Action that triggers a workflow and waits for it to succeed before proceeding
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).

## Arguments
Name | Required | Default | Description
---- | -------- | ------- | -----------
`owner` | true | N/A | Owner of the repo where the workflow is to be triggered.
`repo` | true | N/A | The repo where the workflow is to be triggered.
`token` | true | N/A | An access token with write permissions to `repo`.
`event_type` | true | N/A | The event type parameter to be passed in the repository dispatch request.
`client_payload` | false | `"{}"` | The client payload parameter to be passed in the repository dispatch request. Should be in the format `'{"key1": "value1", "key2": "value2"}'`.
`wait_time` | false | `10` | Time to wait between workflow status checks, in seconds.
`max_time` | false | `60` | Maximum time to wait for the workflow to finish before exiting, in seconds.

## Example usages
Basic use with user-added secret called `ACCESS_TOKEN`:
```
- uses: felixp8/[email protected]
with:
owner: username
repo: reponame
token: ${{ secrets.ACCESS_TOKEN }}
event_type: ping
```
Use with default `GITHUB_TOKEN` and optional inputs:
```
- uses: felixp8/[email protected]
with:
owner: username
repo: reponame
token: ${{ secrets.GITHUB_TOKEN }}
event_type: ping
client_payload: '{"ref": "master"}'
wait_time: 5
max_time: 120
```

0 comments on commit ef495d9

Please sign in to comment.