Become a CI provider
Make your CI product a provider repositories pick in Actions settings: one manifest block, three events, a report API and logs.
The Upstream API is in alpha. Endpoints, fields and limits can change before it's stable. Send feedback to support@coline.app.
A CI company becomes a provider on Upstream by building an app. There is no partner program and no code on our side: declare a ci_provider block, and once an owner installs the app, it shows up in their repository's Actions settings next to GitHub Actions. Owners pick it with one click. Your app hears about runs on its normal webhook and reports back with its installation token.
Runs you report are first-class. They appear on the repository's Actions tab, required checks gate merges on them exactly as they do for GitHub Actions, and agents read their failures through get_failing_checks.
Start from the template
upstream app create my-ci --template ci-provider
cd my-ci && npm install && npm run dev
That makes the app with the block and permissions below and writes a server of about a hundred lines. It hears ci.run_requested, mints a checkout token, clones the commit, runs the repository's .upstream/ci.sh and reports the run, its job, the log and a failure bundle. Webhooks come through a relay, so no tunnel is needed. Install it on a test repository, choose it in that repository's Actions settings, push, and watch the run page.
The manifest block
Add ci_provider to the app manifest, whether people review it in the browser or you send it to POST /v1/apps:
{
"name": "Acme CI",
"hook_attributes": { "url": "https://ci.acme.dev/upstream/webhook" },
"default_permissions": { "contents": "read", "checks": "write", "actions": "write" },
"ci_provider": {
"workflow_globs": [".github/workflows/*.yml", ".acme/pipeline.yml"],
"platforms": ["linux", "macos"],
"supports_dispatch": true,
"supports_cancel": true,
"supports_retry": true,
"supports_logs": true,
"secrets_mode": "provider"
}
}
| Field | What it does |
|---|---|
workflow_globs | Files that start a run. * stays in one folder; each glob lists the folder before its first wildcard. GitHub workflow files keep their on: triggers and branch and path filters; any other file runs on every push and change request. Leave it empty if your app starts runs itself. |
platforms | linux, macos, windows. Workflows whose runs-on needs a platform you don't list are skipped, and the page says why. |
supports_dispatch | Owners can start a run by hand from the workflow page. |
supports_cancel, supports_retry | The run page offers Cancel and Re-run. |
secrets_mode | Only provider: you keep your customers' secrets. Upstream never sends a repository's CI secrets to an app. |
A provider needs contents read (to clone), checks write and actions write (to report). An app that declares the block without them is refused with a message naming what's missing. Your app also needs a webhook URL: the events below go there.
The three events
Each event is a normal app delivery: signed with your webhook secret (X-Hub-Signature-256), carrying X-Upstream-Webhook-Token, and named in X-GitHub-Event (or X-Upstream-Event for native-format apps). They arrive whatever events your app subscribed to, as soon as the push or click happens. Answer with any 2xx quickly and do the work after: a failed delivery is retried ten times with backoff over a few hours, and if every attempt fails its run is marked as never started.
| Event | When |
|---|---|
ci.run_requested | A push, change request or manual run matched a pipeline file |
ci.run_retried | Someone re-ran a run. run.id is the new attempt; run.retry_of the old one. |
ci.run_cancelled | Someone cancelled a run. Stop it, then report conclusion: "cancelled". |
{
"action": "requested",
"run": {
"id": "3f0c…",
"number": 42,
"attempt": 1,
"idempotency_key": "9b1e…",
"retry_of": null,
"workflow": { "path": ".acme/pipeline.yml", "name": "Acme pipeline" },
"trigger": "change_request.version_added",
"ref": "fix-login",
"branch": "fix-login",
"head_sha": "4a1f…",
"change_request": { "number": 7, "version": 2, "base_ref": "main" },
"inputs": {},
"html_url": "https://upstream.codes/acme/web/actions/runs/3f0c…"
},
"repository": {
"id": "c21d…",
"full_name": "acme/web",
"owner": "acme",
"name": "web",
"default_branch": "main",
"clone_url": "https://git.coline.app/acme/web.git",
"private": true
},
"installation": { "id": 4815162342, "uuid": "8e7a…" },
"sender": { "kind": "user", "login": "ada" }
}
The same idempotency_key never means two runs: if you see it twice, it's one delivery retried. installation.id is what Octokit's getInstallationOctokit takes.
Apps that don't use pipeline files still get push, pull_request and check_suite events as usual, and can start runs themselves.
Report the run
The run already exists when ci.run_requested reaches you: update it by run.id, don't create another. Reports go to the native API, https://api.upstream.codes/v1, with an installation token. Only the provider a repository chose can report on its runs; anyone else gets 403 CI_PROVIDER_NOT_CHOSEN. A body Upstream can't accept comes back as 400 VALIDATION_ERROR, naming the field.
PATCH /v1/repos/acme/web/actions/provider/runs/3f0c…
Authorization: Bearer uis_…
{
"status": "completed",
"conclusion": "failure",
"completedAt": "2026-11-22T10:04:11Z",
"detailsUrl": "https://ci.acme.dev/builds/9912",
"errorSummary": "2 tests failed in test (node 22).",
"jobs": [
{
"key": "test",
"name": "test (node 22)",
"status": "completed",
"conclusion": "failure",
"runner": "linux-x64",
"steps": [
{ "name": "Install", "status": "completed", "conclusion": "success" },
{ "name": "Run tests", "status": "completed", "conclusion": "failure" }
],
"failureBundle": {
"summary": "2 tests failed",
"tests": [{ "name": "logs in", "file": "src/auth.test.ts", "line": 14, "message": "expected 200, got 500" }],
"command": "npm test -- src/auth.test.ts",
"exitCode": 1,
"outputTail": "…the last lines of output…"
}
}
]
}
statusisqueued,waiting,in_progressorcompleted, and only moves forward. A completed run needs aconclusion:success,failure,cancelled,skipped,timed_out,neutraloraction_required.- Send as many updates as you like. Jobs are matched by
key; for GitHub workflow files, use the workflow's job ids. detailsUrlandlogsUrllink to your own pages. HTTPS only.- When a run belongs to a change request, its check (
ci/<workflow name>) moves from pending to passed or failed as you report, and blocks the merge if it's required.
Logs
Send a job's log, plain or with ANSI colours, as content in a JSON body (not a raw text upload), and the run page shows it inline, coloured, with the failing job open:
PUT /v1/repos/acme/web/actions/provider/runs/3f0c…/jobs/test/logs
{ "content": "…", "append": false }
append: true adds to the end, for streaming a long job in pieces. Upstream keeps the last 5 MB. Anyone who can read the repository can read its logs at GET /v1/repos/{owner}/{repo}/actions/runs/{run}/jobs/{job}/logs. If you host logs yourself, send logsUrl on the job instead and the page links to it.
The checkout token
POST /v1/repos/acme/web/actions/provider/runs/3f0c…/checkout-token
{ "data": { "token": "urt_…", "expiresAt": "2026-11-22T10:19:11Z", "repositoryId": "c21d…", "permissions": ["repo:read"] } }
It's a repository token (urt_) minted for your installation: it clones that one repository, read-only, for fifteen minutes, and stops working if the app is uninstalled. Clone the event's repository.clone_url with the token as the password and any user name:
git clone "https://x-access-token:$TOKEN@git.coline.app/acme/web.git"
Tokens are only minted for runs that haven't finished. Keep them out of your logs.
The failure bundle
The bundle is what an agent, or a tired person, reads first: what failed, where, how to run it again, and the end of the output. Send it on the failing job:
| Field | Meaning |
|---|---|
summary | One line, e.g. "2 tests failed" |
tests | Up to 50 failing tests: name, file, line, message |
notes | Up to 50 file-and-line notes: file, line, endLine, message, level (failure, warning, notice) |
command | The command that reproduces it locally |
exitCode | The command's exit code |
outputTail | The last lines of output. Upstream keeps the final 32 KB. |
logUrl | Where the full log is |
If you only send outputTail, Upstream reads failing tests and file:line errors out of it. If you report plain check runs with output text or annotations instead, Upstream reads a bundle from those. Either way it lands in the same shape, on the run page, the change's Checks tab and GET /v1/repos/{owner}/{repo}/changes/{number}/failing-checks.
Start a run yourself
For pipelines Upstream doesn't know about, create the run and then report it as above:
POST /v1/repos/acme/web/actions/provider/runs
{ "name": "Nightly", "headSha": "4a1f…", "branch": "main", "idempotencyKey": "nightly-2026-11-22", "status": "in_progress" }
The same idempotencyKey returns the same run. When the commit heads an open change request, the run reports a check there.
Test with the relay
npm run dev in the template runs upstream webhook forward, which replays your app's deliveries, ci.* events included, to http://localhost:3000/api/webhook. To test without pushing, make a manual run from the repository's workflow page (with supports_dispatch), or re-run an old one. Each delivery and its response code appear in the repository's Actions settings, where a maintainer can send it again.
Get listed
Make the app public and leave it listed (see App directory). Apps with a ci_provider block appear under CI providers at upstream.codes/apps?category=ci, which is where Actions settings sends owners who have none installed.