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.
Generate it
Section titled “Generate it”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).
-
In the project’s setup checklist, under Generate an ingest token, click Generate token.
-
Copy it immediately — only a hash is stored, so it’s shown once. (You can regenerate anytime, which invalidates the old one.)
-
Add it to your repository as a secret named
SQLANVIL_CLOUD_TOKEN, and set a repository variableSQLANVIL_CLOUD_URLtohttps://app.sqlanvil.com.
How CI uses it
Section titled “How CI uses it”Your branch-CI workflow POSTs the run result to the ingest endpoint:
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.