Add event documentation (#137)
This commit is contained in:
parent
ca648a37c8
commit
643f8d08b7
1 changed files with 21 additions and 0 deletions
21
README.md
21
README.md
|
@ -99,6 +99,27 @@ Additionally, act support loading environment variables from a `.env` file. The
|
||||||
act --env-file my.env
|
act --env-file my.env
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Events
|
||||||
|
Every [Github event](https://developer.github.com/v3/activity/events/types) is accompanied with a payload. You can provide these events in JSON format with the `--eventpath` to simulate specific Github events kicking off an action. For example:
|
||||||
|
|
||||||
|
``` pull-request.json
|
||||||
|
{
|
||||||
|
"pull_request": {
|
||||||
|
"head": {
|
||||||
|
"ref": "sample-head-ref"
|
||||||
|
},
|
||||||
|
"base": {
|
||||||
|
"ref": "sample-base-ref"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
```
|
||||||
|
act -e pull-request.json
|
||||||
|
```
|
||||||
|
|
||||||
|
Act will properly provide `github.head_ref` and `github.base_ref` to the action as expected.
|
||||||
|
|
||||||
# Support
|
# Support
|
||||||
|
|
||||||
Need help? Ask on [Gitter](https://gitter.im/nektos/act)!
|
Need help? Ask on [Gitter](https://gitter.im/nektos/act)!
|
||||||
|
|
Loading…
Reference in a new issue