tambah webhook

This commit is contained in:
Saufi
2026-05-22 16:12:05 +08:00
parent d9ecdfc8f6
commit 2a67d937e8
5 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
FROM alpine:3.21
RUN apk add --no-cache git docker-cli curl && \
curl -fsSL https://github.com/adnanh/webhook/releases/download/2.8.1/webhook-linux-amd64.tar.gz \
| tar xz -C /usr/local/bin --strip-components=1
EXPOSE 9000
ENTRYPOINT ["/usr/local/bin/webhook"]

18
docker/webhook/hooks.json Normal file
View File

@@ -0,0 +1,18 @@
[
{
"id": "deploy",
"execute-command": "/deploy.sh",
"command-working-directory": "/srv/ecert",
"response-message": "Deploy dimulakan.",
"trigger-rule": {
"match": {
"type": "payload-hmac-sha256",
"secret": "{{ .Env.WEBHOOK_SECRET }}",
"parameter": {
"source": "header",
"name": "X-Hub-Signature-256"
}
}
}
}
]