mirror of
https://github.com/joelwmale/webhook-action.git
synced 2026-08-31 00:19:45 +08:00
feat: finish updates & adding github event support
This commit is contained in:
@@ -20,7 +20,7 @@ Example:
|
||||
url: ${{ secrets.WEBHOOK_URL }}
|
||||
headers: '{"repository": "joelwmale/webhook-action"}'
|
||||
body: '{"event": "deployment", "repository": "joelwmale/webhook-action"}'
|
||||
github_event: ${{ toJson(github.event) }}
|
||||
github_event_payload: true
|
||||
```
|
||||
|
||||
It is **highly** recommended to use the action is an explicit commit SHA-1:
|
||||
@@ -35,12 +35,28 @@ The action has support for the following input variables (arguments):
|
||||
* **`headers`** (**optional**): Any headers you want to be sent with the webhook
|
||||
* **`body`** (**optional**): The body of data send with the webhook
|
||||
* **`insecure`** (**optional**): Enables calling to known self-signed or invalid SSL certificates
|
||||
* **`github_event`** (**optional**): Enables forwarding the Github event to your webhook
|
||||
* **`github_event_payload`** (**optional**): Enables forwarding the Github event payload to your webhook.
|
||||
|
||||
You can find more information on how to use these input variables below.
|
||||
|
||||
## Arguments
|
||||
|
||||
#### URL
|
||||
|
||||
**Required:** true
|
||||
|
||||
The URL to send the webhook to
|
||||
|
||||
```yml
|
||||
url: ${{ secrets.WEBHOOK_URL }}
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```yml
|
||||
url: https://webhook.site/8b1b1b1b-8b1b-8b1b-8b1b-8b1b1b1b1b1b
|
||||
```
|
||||
|
||||
#### Headers
|
||||
|
||||
**Required:** false
|
||||
@@ -62,6 +78,30 @@ Allows you to send a custom JSON object to the webhook
|
||||
body: '{"event": "deployment", "repository": "joelwmale/webhook-action"}'
|
||||
```
|
||||
|
||||
#### Insecure
|
||||
|
||||
**Required:** false
|
||||
**Default:** false
|
||||
|
||||
Allows you to send a webhook to a known self-signed or invalid SSL certificate
|
||||
|
||||
```yml
|
||||
insecure: true
|
||||
```
|
||||
|
||||
#### Github Event Payload
|
||||
|
||||
**Required:** false
|
||||
**Default:** false
|
||||
|
||||
Allows you to send the Github event payload to your webhook
|
||||
|
||||
The payload will be sent as a JSON object under the key `githubEventPayload` on the root of the payload sent to your webhook
|
||||
|
||||
```yml
|
||||
github_event_payload: true
|
||||
```
|
||||
|
||||
## Issues
|
||||
|
||||
If you find any issues or have an improvement feel free to [submit an issue](https://github.com/joelwmale/webhook-action/issues/new)
|
||||
|
||||
Reference in New Issue
Block a user