Skip to content

The ingest token

import { Steps } from ‘@astrojs/starlight/components’;

The ingest token lets a CI job report run results back to your SQLAnvil Cloud dashboard. It powers the self-hosted branch-CI path: execution runs in your own GitHub Actions (your compute), and the result — status + log — is POSTed to Cloud so it shows up alongside your other runs.

This is distinct from the GitHub App’s webhook path (which creates runs directly). The ingest token is specifically for your CI calling us.

The token is issued on demand, and only once a repo is connected (a token has no purpose without a repo for CI to live in).

  1. In the project’s setup checklist, under Generate an ingest token, click Generate token.

  2. Copy it immediately — only a hash is stored, so it’s shown once. (You can regenerate anytime, which invalidates the old one.)

  3. Add it to your repository as a secret named SQLANVIL_CLOUD_TOKEN, and set a repository variable SQLANVIL_CLOUD_URL to https://app.sqlanvil.com.

Your branch-CI workflow POSTs the run result to the ingest endpoint:

Terminal window
curl -X POST "$SQLANVIL_CLOUD_URL/api/ingest/runs" \
-H "Authorization: Bearer $SQLANVIL_CLOUD_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "trigger": "branch_ci", "status": "success",
"gitBranch": "my-feature", "prNumber": 42, "log": "..." }'

The token authenticates the request to your project; the run then appears in the dashboard. Keep it secret — treat it like any other CI credential.