GitHub & Registry Integrations
Connect ZopNight to GitHub for source, builds, and webhooks, and to container registries (ECR, GAR, ACR, Docker Hub) for image push/pull.
Integrations are the external systems ZopNight reaches into when you deploy. The most important one today is GitHub: ZopNight authenticates as a GitHub App, lists your repos, kicks off Actions-based builds, and receives push/PR webhooks. Container registry credentials (ECR, GAR, ACR, Docker Hub) are stored alongside in the same integrations table.
GitHub App Installation
- The user clicks “Connect GitHub” in ZopNight.
- ZopNight redirects to GitHub’s app install page via
GET /integrations/github/install. - GitHub redirects back with an installation ID, which lands on
GET /integrations/github/callback. - ZopNight stores the installation, exchanges short-lived tokens at deploy time, and starts receiving webhooks.
/integrations/github/install Initiates the GitHub App install flow. Returns a redirect to the GitHub App install page.
/integrations/github/callback OAuth/install callback. ZopNight finalizes the installation and stores the integration record.
Manage Integrations
/integrations List integrations.
{ "data": [ { "id": "int_github_001", "kind": "github", "name": "Acme GitHub Org", "metadata": { "installationID": 12345678, "githubOrg": "acme" }, "createdAt": "2026-04-01T10:00:00Z" }, { "id": "int_ecr_001", "kind": "ecr", "name": "ECR — production AWS", "metadata": { "registry": "123456789012.dkr.ecr.us-east-1.amazonaws.com", "cloudAccountID": "ca_abc123" }, "createdAt": "2026-04-02T08:00:00Z" } ]}/integrations Create an integration. Most flows go through the connect endpoints (GitHub install, GCP OAuth) — this is the manual path for static credentials (e.g. Docker Hub username/password).
curl -X POST https://zopnight.com/api/integrations \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "kind": "dockerhub", "name": "Docker Hub — acme", "credentials": { "username": "acme-bot", "password": "..." } }'/integrations/{id} Get an integration by ID. Secrets are never returned.
/integrations/{id} Update an integration (display name, metadata, or rotated credentials).
/integrations/{id} Delete an integration. Deployments referencing it will fail until reassigned. GitHub integrations also revoke the installation on GitHub's side.
Supported Integration Kinds
| Kind | Used for | Auth |
|---|---|---|
github | Source code, build dispatch, webhooks | GitHub App installation token (short-lived) |
ecr | Container image push/pull (AWS) | Inherits the bound cloud account |
gar | Container image push/pull (GCP) | Inherits the bound cloud account |
acr | Container image push/pull (Azure) | Inherits the bound cloud account |
dockerhub | Container image push/pull (Docker Hub) | Username + password / access token |
For the MCP integration (AI assistants connecting to ZopNight) see MCP Server.