Skip to content

Shared CI Runners

Disposable GitHub Actions runners with reserved capacity, bounded recovery and job-specific Cloudflare access.

The Problem

Shared runners must admit the intended GitHub job, recover interrupted execution, and limit deployment access to the matching repository and workflow. Duplicate events, cancellations and lost runners need explicit handling.

How It Works

  1. 01Verify GitHub webhook signatures, allowlisted repositories and exact run labels before creating a per-job Workflow.
  2. 02Acquire a capacity lease, recheck GitHub job state and run a just-in-time registered runner in a disposable container.
  3. 03Bound retries and cleanup, with retained log tails and reconciliation for interrupted jobs.
  4. 04Verify GitHub OIDC claims at runner egress and the account credential broker before proxying granted API requests.

Engineering Decisions

  • Keep GitHub authoritative for job state

    Webhook delivery and container execution can be interrupted. Rechecking the job prevents a stale event from being treated as a new execution request.

    GitHub API checks and durable retries add latency and operational state; a runner process exit alone is not the final job conclusion.

  • Proxy deployment access through an OIDC grant

    The broker verifies signed job identity and matches one reviewed grant while keeping the account API token outside the runner.

    Grant maintenance is explicit. The current matcher refuses reusable workflows and ambiguous matches instead of inferring their trust.

Outcome

Each job passes separate admission, recovery and access checks. Its deployment grant must match the repository, ref, workflow and environment.