hydra/doc/manual/src/webhooks.md

28 lines
1.1 KiB
Markdown
Raw Normal View History

2021-10-30 09:35:01 +02:00
# Webhooks
2022-06-18 13:22:42 +02:00
Hydra can be notified by github or gitea with webhooks to trigger a new evaluation when a
2021-10-30 09:35:01 +02:00
jobset has a github repo in its input.
2022-06-18 13:22:42 +02:00
## GitHub
To set up a webhook for a GitHub repository go to `https://github.com/<yourhandle>/<yourrepo>/settings`
and in the `Webhooks` tab click on `Add webhook`.
2021-10-30 09:35:01 +02:00
- In `Payload URL` fill in `https://<your-hydra-domain>/api/push-github`.
- In `Content type` switch to `application/json`.
- The `Secret` field can stay empty.
- For `Which events would you like to trigger this webhook?` keep the default option for events on `Just the push event.`.
Then add the hook with `Add webhook`.
2022-06-18 13:22:42 +02:00
## Gitea
To set up a webhook for a Gitea repository go to the settings of the repository in your Gitea instance
and in the `Webhooks` tab click on `Add Webhook` and choose `Gitea` in the drop down.
- In `Target URL` fill in `https://<your-hydra-domain>/api/push-gitea`.
- Keep HTTP method `POST`, POST Content Type `application/json` and Trigger On `Push Events`.
- Change the branch filter to match the git branch hydra builds.
Then add the hook with `Add webhook`.