Skip to content

appscodelabs/gh-ci-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gh-ci-webhook

Installation

  • Download pre-built binary into a server
curl -fsSL -O https://github.com/appscodelabs/gh-ci-webhook/releases/download/v0.0.17/gh-ci-webhook-linux-amd64
chmod +x gh-ci-webhook-linux-amd64
mv gh-ci-webhook-linux-amd64 /usr/local/bin/gh-ci-webhook
  • Install systemd service
curl -fsSL -O https://github.com/appscodelabs/gh-ci-webhook/raw/v0.0.17/hack/systemd/gh-ci-webhook.service
chmod +x gh-ci-webhook.service

# edit gh-ci-webhook.service file to add `--ssl --secret-key=<uuid>`

mv gh-ci-webhook.service /lib/systemd/system/gh-ci-webhook.service

Now, you should be able to enable the service, start it, then monitor the logs by tailing the systemd journal:

sudo systemctl enable gh-ci-webhook.service
sudo systemctl start gh-ci-webhook
sudo journalctl -f -u gh-ci-webhook

Configure Webhooks

private repo

https://this-is-nats.appscode.ninja/payload?ci-repo=github.com/appscode-cloud/grafana-tester&actions=closed

public repo

https://this-is-nats.appscode.ninja/payload?pr-repo=github.com/appscode-cloud/private-repo

Also, set the <uuid> passed to gh-ci-webhook.service as the secret key.

Configure NATS subject mapping

nats server mapping "ghactions.runs.*.*" "ghactions.machines.{{wildcard(1)}}.{{partition(1,2)}}"