Skip to content

Setup Webhook

Kim Oliver Drechsel edited this page Aug 11, 2024 · 3 revisions

This page shows how to set up a webhook for your deployments.

A webhook is a http request that is sent to a URL when a specific event occurs.

Table of Contents

GitHub

  1. Go to your repository settings.
  2. Click on Webhooks.
  3. Click on the Add webhook button.
  4. Fill in the following fields:
    • Payload URL: The URL to the app endpoint, e.g. https://example.com/v1/webhook.
    • Content type: Set this to application/json.
    • Secret: The WEBHOOK_SECRET you have set in your app configuration (See App Settings).
    • SSL verification: Enable this if you have a valid SSL certificate for the app endpoint.
    • Which events would you like to trigger this webhook?: Set this to Just the push event or Let me select individual events and then Pushes and/or Branch or tag creation.
    • Active: Enable this to activate the webhook.

Gitea

  1. Go to your repository settings.
  2. Click on Webhooks.
  3. Click on the Add webhook button and select Gitea in the dropdown.
  4. Fill in the following fields:
    • Target URL: The URL to the app endpoint, e.g. https://example.com/v1/webhook.
    • HTTP Method: Set to POST.
    • POST Content Type: Set to application/json.
    • Secret: The WEBHOOK_SECRET you have set in your app configuration (See App Settings).
    • Trigger On: Set this to Push Events or Custom Events... and then Create and/or Push.
    • Branch filter: Set this to the branch you want to trigger the webhook or * for all branches.
    • Active: Enable this to activate the webhook.

Gitlab

  1. Go to your repository settings.
  2. Click on Webhooks.
  3. Click on the Add new webhook button.
  4. Fill in the following fields:
    • URL: The URL to the app endpoint, e.g. https://example.com/v1/webhook.
    • Secret Token: The WEBHOOK_SECRET you have set in your app configuration (See App Settings).
    • Trigger: Set this to Push events and/or Tag push events.
    • SSL verification: Enable this if you have a valid SSL certificate for the app endpoint.
  5. Click on the Test button and then Push events to test the webhook.
Clone this wiki locally