A lightweight GitHub webhook proxy for Discord.
docker run --name gohook -d -p 8080:8080 ghcr.io/krabiworld/gohookservices:
gohook:
image: "ghcr.io/krabiworld/gohook"
ports:
- "8080:8080"helm repo add gohook https://krabiworld.github.io/gohook
helm install gohook gohook/gohookOr you can use OCI repository:
helm install gohook oci://ghcr.io/krabiworld/gohookSee helm/values.yaml
You can download precompiled binaries for Linux, macOS and Windows from the GitHub Releases page.
To build gohook from source, you only need Go (the version specified in go.mod or later).
Start by cloning the repository:
git clone https://github.com/krabiworld/gohook.git
cd gohookThen build the binary and run it:
go build ./cmd/gohook
./gohook- Create a webhook in Discord
- Go to Discord channel settings -> Integrations
- Click Create Webhook, give it a name
- Copy the webhook URL
- Configure GitHub
- Go to
https://github.com/<username>/<repository>/settings/hooks/new - In Payload URL, paste the copied Discord Webhook URL and replace
https://discord.com/api/webhookswith your Gohook URL
Original Discord URL: https://discord.com/api/webhooks/123456/abcdef Replace with Gohook URL: https://gohook.your-domain.com/123456/abcdef- In Content Type, select
application/json - In Secret, paste your secret (if you set environment variable
SECRET) - In Which events would you like to trigger this webhook?, select
Send me everything. - Click Add webhook
- Go to
All environment variables are optional.
| Variable | Description | Default value | Example |
|---|---|---|---|
LOG_LEVEL |
How much detail to log. Options: debug, info, warn, error. |
info |
debug |
ADDR |
Address and port the server listens on. | :8080 |
127.0.0.1:9000 |
SECRET |
Shared secret to validate GitHub signatures. Leave empty to disable checks. | random-string |
|
HAPPY_EMOJI |
Emoji displayed when someone stars the repository. | 🔥 or <:foxtada:1399709119304306746> |
|
SUCCESS_EMOJI |
Emoji displayed for successful workflows or checks. | ✨ or <:catgood:1399709119304306747> |
|
FAILURE_EMOJI |
Emoji displayed for failed workflows or checks. | 😭 or <:catscream:1399709119304306748> |
| API name | UI name | Supported actions | Notes |
|---|---|---|---|
check_run |
Check runs | completed |
Ignores these checks: Dependabot, GitHub Actions and GitHub Advanced Security |
fork |
Forks | ||
issue_comment |
Issue comments | All | |
issues |
Issues | All | |
public |
Visibility changes | ||
pull_request |
Pull requests | All except labeled and synchronize |
|
push |
Pushes | ||
release |
Releases | published |
|
repository |
Repositories | archived, privatized, renamed and unarchived |
|
star |
Stars | created |
|
workflow_run |
Workflow runs | completed |
Ignores these workflows: CodeQL, Dependabot Updates and Automatic Dependency Submission |
- GET:
/health - POST:
/:id/:token
All standard environment variables are supported, such as HTTP_PROXY, HTTPS_PROXY and ALL_PROXY.