Skip to content

GitHub Webhooks

This guide explains how to configure GitHub webhooks to trigger automated deployments with TRIGRA.

When you push to your repository:

  1. GitHub sends a webhook POST request to your TRIGRA endpoint
  2. TRIGRA validates the webhook signature using your secret
  3. If valid, TRIGRA fetches the changed files from Git
  4. Kubernetes manifests are applied to your cluster

After installing TRIGRA, get your webhook URL:

Terminal window
# For LoadBalancer
kubectl get svc trigra -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
# For Cloudflare Tunnel (shown after install)
# https://random-words.trycloudflare.com/webhook

Your webhook secret was either:

  • Generated during installation (shown in output)
  • Provided by you during installation
  • Stored in the Kubernetes secret:
Terminal window
kubectl get secret trigra-secret -o jsonpath='{.data.WEBHOOK_SECRET}' | base64 -d
  1. Go to your repositorySettingsWebhooks
  2. Click Add webhook
  3. Fill in the form:
FieldValue
Payload URLhttp://YOUR-IP/webhook or https://random.trycloudflare.com/webhook
Content typeapplication/json
SecretYour webhook secret
SSL verificationEnable if using HTTPS
EventsJust the push event
  1. Click Add webhook

GitHub will send a ping event. Check it:

  1. Go to Webhooks → Your webhook → Recent Deliveries
  2. You should see a successful ping (green checkmark)

TRIGRA uses HMAC-SHA256 to verify webhook authenticity.

Never expose your webhook secret! Store it securely.

  • Cause: Signature mismatch
  • Fix: Ensure webhook secret matches in GitHub and TRIGRA
  • Cause: Wrong URL path
  • Fix: Ensure URL ends with /webhook
  • Cause: TRIGRA not accessible externally
  • Fix: Use Cloudflare Tunnel or verify network access