Documentation

GitHub & Registry Integrations

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.

One per provider, per org

Most orgs have exactly one GitHub integration (the org-level GitHub App installation) and one registry per cloud account. You can have more if you split across GitHub orgs or maintain separate registries per environment.

GitHub App Installation

  1. The user clicks "Connect GitHub" in ZopNight.
  2. ZopNight redirects to GitHub's app install page via GET /integrations/github/install.
  3. GitHub redirects back with an installation ID, which lands on GET /integrations/github/callback.
  4. ZopNight stores the installation, exchanges short-lived tokens at deploy time, and starts receiving webhooks.
GET
/integrations/github/install

Initiates the GitHub App install flow. Returns a redirect to the GitHub App install page.

GET
/integrations/github/callback

OAuth/install callback. ZopNight finalizes the installation and stores the integration record.

Manage Integrations

GET
/integrations

List integrations.

Responsejson
{
  "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"
    }
  ]
}
POST
/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).

Request — Docker Hub registrybash
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": "..."
    }
  }'
GET
/integrations/{id}

Get an integration by ID. Secrets are never returned.

PUT
/integrations/{id}

Update an integration (display name, metadata, or rotated credentials).

DELETE
/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

KindUsed forAuth
githubSource code, build dispatch, webhooksGitHub App installation token (short-lived)
ecrContainer image push/pull (AWS)Inherits the bound cloud account
garContainer image push/pull (GCP)Inherits the bound cloud account
acrContainer image push/pull (Azure)Inherits the bound cloud account
dockerhubContainer image push/pull (Docker Hub)Username + password / access token

For the MCP integration (AI assistants connecting to ZopNight) see MCP Server.