/webhook-trigger

A Github Action for sending data to an endpoint. Supports for triggering any webhook events.

Primary LanguageDockerfileMIT LicenseMIT

Gitpod Ready-to-Code

🚀 Webhook Trigger

GitHub Release License

A Github Action for sending data to an endpoint.

Supports for triggering any webhook events.


Usage

Sending data to trigger a github webhook event, it can trigger workflow of another repo too (see douments for more information documents):

- name: Webhook
  uses: zzzze/webhook-trigger@master
  with:
    data: "{\"event_type\":\"build\"}"
    webhook_url: ${{ secrets.WEBHOOK_URL }}
    options: "-H \"Accept: application/vnd.github.everest-preview+json\" -H \"Authorization: token ${{ secrets.TOKEN }}\""

Inputs

All inputs will pass to curl command, so see curl document for more information.

Name Required Default Description Example
webhook_url true "" Endpoint URL "https://****"
data true "" Data to be posted "{\"event_type\":\"build\"}"
options false "" Options "-a foo -b bar"
user false "" The user name and password to use for server authentication "user:password"

With the inputs above, the action will invoke the following command finally:

curl -X POST https://**** --user user:password --data "{\"event_type\":\"build\"}" -a foo -b bar

Issues

If you find any issues or have an improvement feel free to submit an issue

License

The MIT License (MIT). Please see License File for more information.