nikdoof.com

/technotes/ webhook

Webhook

A simple HTTP server is written in Go to take incoming webhooks and execute actions. It supports methods of validating webhook secrets, and can pass values provided from the hook call into shell scripts.

Example Webhooks

From GitHub

Accepts a GitHub actions call, and validates a secret set on the call in Github.

[
    {
        "id": "hugo",
        "execute-command": "/usr/local/src/hugo-sites/hugo-update.sh",
        "command-working-directory": "/usr/local/src/hugo-sites",
        "trigger-rule": {
            "match": {
                "type": "payload-hmac-sha1",
                "secret": "xxxxxxxxxxxxx",
                "parameter": {
                    "source": "header",
                    "name": "X-Hub-Signature"
                }
            }
        }
    },
]

References