Skip to content

GitHub Actions execution mode

GitHub Actions is the default BoardReadyOps Cloud execution backend. KiCad checks run in the repository being analyzed; the cloud service handles GitHub App webhooks, Check Runs, run state, dashboards, and authenticated result ingestion.

ops-vps-03 or another BoardReadyOps-operated KiCad worker is not required for this mode. Customer self-hosted runners remain an optional enterprise mode.

Topology

pull_request webhook
  -> BoardReadyOps Cloud control plane
  -> target repository workflow_dispatch
  -> GitHub-hosted ubuntu runner
       -> exact commit checkout
       -> KiCad 10 + pinned BoardReadyOps Action
       -> GitHub workflow artifacts
       -> run/attempt-bound GitHub OIDC callback
  -> BoardReadyOps Cloud persists findings and completes the Check Run

The workflow runs in the target repository. Private source, workflow logs, checkout credentials, and GitHub Actions artifacts do not move to a central BoardReadyOps runner repository or control-plane filesystem.

Repository prerequisite

Copy the reviewed workflow from:

.github/workflows/readiness-runner.yml

into the same path on the target repository's default branch. The target repository also needs a reviewed boardreadyops.yml because the pinned compatibility Action treats that path as an explicit configuration file. Set the non-secret repository variable BOARDREADYOPS_CLOUD_ORIGIN to the deployed BoardReadyOps control-plane HTTPS origin before dispatch. There is no baked-in production origin; a missing or non-HTTPS value fails closed before an OIDC callback is attempted.

Do not place the workflow only on a pull request branch. GitHub's workflow-dispatch endpoint resolves workflow files from the repository default branch.

Guided repository setup and readiness probe

The hosted setup preview is available at /setup. It presents three selectable versioned policy presets—open-source hardware, prototype fabrication, and production release—plus the exact proposed boardreadyops.yml, workflow path, permissions, and review steps. Selecting or switching a preset appends a new setup revision; it never rewrites prior setup history.

contract-design is retained only as a historical setup-revision identifier. New setup selections reject it because its generated policy was semantically identical to Production release.

Configure /setup as the GitHub App Setup URL and enable redirect-on-update. GitHub supplies an untrusted installation_id query parameter after installation or repository-selection changes. The public page never displays or authorizes from that value; repository-specific setup state remains behind the authenticated operator API.

The operator API exposes the persisted setup state at:

GET|POST /api/v1/operator/installations/<installation-id>/repositories/<repository-id>/setup

POST supports idempotent select_preset and probe actions. A probe first reads the target workflow metadata through the installation-scoped App token using the existing Actions permission; it does not call the Administration-only repository Actions settings endpoint. When the workflow is active, the control plane dispatches a 15-minute setup probe in the target repository. The probe checks out the repository default branch with persisted credentials disabled, validates boardreadyops.yml using a pinned CLI, and posts only bounded status metadata to:

POST /api/v1/setup-probes/result?probe_id=<uuid>

The callback accepts GitHub Actions OIDC only. Verification binds the token to the repository full name and numeric repository ID, .github/workflows/readiness-runner.yml, the persisted default-branch ref, and the exact probe audience. Missing workflow, disabled Actions, incompatible workflow metadata, missing configuration, invalid configuration, expired probe, stale probe, and dispatch failure remain distinct states.

Every accepted release run snapshots the effective setup revision. Later preset changes therefore do not alter the policy provenance shown for historical runs.

Workflow permissions

The job declares only:

permissions:
  actions: read
  checks: read
  contents: read
  id-token: write

These are job-scoped permissions for the workflow's short-lived repository GITHUB_TOKEN:

  • actions: read — read historical BoardReadyOps workflow artifacts in this repository only;
  • checks: read — read the App-created Check Run that binds this release run to its exact PR base SHA;
  • contents: read — checkout the exact assigned commit; and
  • id-token: write — obtain the short-lived OIDC token for the result callback.

This job permission change does not alter the production GitHub App permission profile below. No BOARDREADYOPS_API_KEY, runner callback secret, GitHub personal access token, or App private key is stored in the repository.

Exact-base hardware-impact boundary

For PR-native hardware impact, the control plane records the webhook's exact PR base SHA in the queued BoardReadyOps Check Run. The target workflow reads that Check Run using its job-scoped checks: read permission and binds it to the exact release run_id and head SHA before comparison. No new workflow_dispatch input is required, so existing target workflows do not receive an unexpected input during rolling upgrades.

The Action then resolves the historical BoardReadyOps artifact only inside the same target repository and same workflow identity. If the exact base artifact is absent or invalid, it does not fall back to another run. Raw historical/current reports, source files, and workflow artifacts stay in the target repository. The OIDC callback may carry only the validated bounded hardwareImpact object; the control plane stores it inside the existing tenant-scoped terminal-result payload and uses it for Check Run/optional PR-comment rendering.

GitHub App permissions

The target-repository Actions profile requires:

Permission Level Purpose
Metadata Read Installation and repository identity
Pull requests Read Receive supported pull request webhooks
Checks Read and write Create, start, and complete the BoardReadyOps Check Run
Actions Read and write Dispatch .github/workflows/readiness-runner.yml in the target repository

Pull request comments are optional and require a separate reviewed write permission. The App does not need Contents access for this execution mode.

Changing requested App permissions requires existing installations to be re-authorized before workflow dispatch will succeed.

Control-plane configuration

BOARDREADYOPS_RUNNER_MODE=github-actions
BOARDREADYOPS_DISPATCH_WORKFLOW=readiness-runner.yml
BOARDREADYOPS_PUBLIC_URL=https://boardreadyops.example.com
BOARDREADYOPS_RELEASE_REPOSITORIES=owner/repository

For Vercel production with an existing write-only rollout allowlist, do not replace the secret just to add another test repository. Set the non-secret, production-scoped BOARDREADYOPS_RELEASE_CANARY_REPOSITORIES=owner/repository configuration variable and redeploy the existing production build instead. It adds at most 16 explicitly named owner/repository entries to the existing allowlist and single-repository pilot; *, all, and malformed entries never widen rollout. An explicit file-based policy still takes precedence. Adding a repository permits bounded readiness checks, not fabrication or guest sharing.

To keep the rollout allow-list outside the secret-bearing runtime environment, store one repository per line in a non-secret policy file and deploy with BOARDREADYOPS_CLOUD_RELEASE_REPOSITORIES_FILE=/home/ubuntu/boardreadyops-cloud/release-repositories on newly commissioned hosts. The deployer mounts it read-only as BOARDREADYOPS_RELEASE_REPOSITORIES_FILE; a configured file takes precedence and fails closed if it cannot be read or exceeds 64 KiB.

Existing deployments with /opt/boardreadyops-cloud/release-repositories are not migrated automatically by merging new code. Before further commissioning, run the reviewed bash scripts/migrate-cloud-release-policy.sh --check in the commissioned host's checkout, and separately authorize --apply. The operator script checks that both consumers use the same running image, their policy contents/readiness match, and the host-local deploy.sh really preserves the running image tag. Older wrappers that override BOARDREADYOPS_IMAGE_TAG with the checkout SHA cause a preflight failure before container changes; fix such wrappers only through separately authorized production change control. The original root-owned file and a protected legacy override backup are retained for --rollback. cloud-deploy accepts only the two known policy mount sources and rejects mixed or ambiguous overrides. No secret-bearing runtime files or privileged directory permissions are changed.

Host image pinning is a separate, explicit prerequisite: bash scripts/repair-cloud-deploy-image-pin.sh --check verifies the current host-local deploy.sh contract without mutation, and --apply requires separate production authorization. This precise wrapper repair preserves default checkout-tag deployment, accepts an explicitly provided 40-hex Git SHA only when supplied, and retains a mode-0600 byte-for-byte backup with guarded --rollback. Neither merging code nor running the normal cloud workflow modifies the wrapper. The commissioning and migration preflights remain authoritative for matching the requested tag to the live image ID. See self-hosted runbook.

Production repository commissioning is handled by the manual cloud-commission-repository workflow. It accepts only an explicit owner/repository, serializes with cloud-deploy, verifies that both live consumers are already using the non-secret rollout policy mount, updates that policy atomically and idempotently, recreates only web and worker with the verified running image through the existing deploy runbook (to refresh file bind mounts after atomic replacement), verifies their local readiness endpoints and confirms each consumer reads the requested repository. Failures attempt to restore the previous policy and recreate those consumers. If the policy file or mount is not already commissioned, the workflow fails before mutation instead of falling back to the secret-bearing runtime environment.

Legacy Compose hosts created before the policy-file mount existed may use the workflow's bootstrap_legacy_inline input for a one-time migration. This path is default-off. It reads the live web/worker inline rollout value only inside the remote shell, requires both consumers to agree, writes the non-secret policy file, and creates the BoardReadyOps-owned /home/ubuntu/boardreadyops-cloud/compose.release-policy.yml override. The existing commissioned deploy.sh remains the only component that fetches the secret-bearing runtime configuration; bootstrap passes the dedicated override to that wrapper as an additional -f file and pins recreation to the image already running in both consumers. If recreation or readiness fails, the workflow removes the new override and policy file and recreates the legacy topology through the same wrapper. Future cloud-deploy runs automatically reuse compose.release-policy.yml when it is present, so a normal deploy cannot silently drop the policy mount. The workflow never prints or edits the secret-bearing runtime environment.

Repositories containing multiple KiCad fixtures or projects can set the non-secret repository variable BOARDREADYOPS_PROJECT to one project directory or .kicad_pro path. Repositories whose configuration file is not at the root can set BOARDREADYOPS_CONFIG to that file. When unset, BoardReadyOps scans every discovered project and uses boardreadyops.yml.

Do not configure a central dispatch repository. The control plane always dispatches the workflow in the repository associated with the release run and uses that repository's persisted default branch.

Optional source-bound manufacturing export import

When a target repository sets the non-secret BOARDREADYOPS_PROJECT variable to one project directory or exact .kicad_pro path, the readiness workflow also runs the SHA-pinned manufacturing export action against the exact reviewed checkout. With the variable unset, the ordinary readiness workflow does not attempt a manufacturing export.

The target repository signs the export manifest and every generated Gerber, drill, BOM and CPL file using its own GitHub OIDC identity and GitHub-internal Sigstore bundle. It then posts the self-contained archive to:

POST /api/v1/runs/{runId}/attempts/{executionAttemptId}/manufacturing-export
Authorization: Bearer <GitHub Actions OIDC token>
Content-Type: application/gzip

The cloud resolves the active repository, installation, target SHA, workflow path, GitHub workflow run ID and execution-attempt mapping from PostgreSQL. It obtains the signer workflow SHA and GitHub run attempt only from the cryptographically verified OIDC claims. The reviewed source SHA and signer workflow SHA are separate values; neither is trusted from the uploaded manifest. The server verifies the self-contained manifest, exact exported file inventory, every subject digest and the Sigstore bundle with the pinned GitHub CLI before persisting the archive and immutable tenant/run/attempt evidence row.

The import is idempotent per BoardReadyOps execution attempt. Replayed, stale, wrong-tenant, wrong-run, wrong-attempt and incomplete archives fail closed. This import does not create a revision, grant guest access, approve fabrication, or bypass the explicit workspace owner/admin share authorization. Deliveries surfaces distinguish source-bound verified exports from legacy or manual run-backed archives whose source-to-export link is not established. Legacy/manual archives remain inspectable, but cannot receive new share grants or guest links until a fresh signed source-bound export is imported.

The existing readiness result callback remains independent: an optional manufacturing-export failure does not replace the normal readiness result, and it cannot promote an unverified package.

The callback endpoint is:

POST /api/v1/runs/github-actions-result?run_id=<uuid>&attempt_id=<uuid>

The endpoint accepts GitHub Actions OIDC only. It resolves the expected repository, numeric repository ID, workflow file, default branch, exact target commit SHA, run ID, execution-attempt ID, and immutable trust snapshot from PostgreSQL before verifying the token. The target commit SHA is bound in the OIDC audience, not by requiring it to equal the JWT sha claim: workflow_dispatch runs on the persisted default-branch ref, so the GitHub-issued JWT sha identifies that workflow ref's commit, which can differ from the separately checked-out target commit. Comparing those two SHAs would reject valid readiness callbacks. The verifier still checks the GitHub-issued workflow/repository/ref/event claims and exact persisted audience. It then delegates to the normal result persistence and Check Run publication path.

Two-installation adversarial validation

The manual target-repository-isolation workflow provides the bounded database-backed adversarial proof required by ADR-0010 and the Cloud Control Plane Reliability milestone. It provisions an isolated PostgreSQL 17 service, creates two unrelated installations and repositories, signs short-lived test OIDC tokens with a disposable in-memory RSA key, and exercises the real GitHub Actions result callback and result-publication path. Run it from GitHub Actions or reproduce the same contract with pnpm run cloud:isolation:verify after applying migrations to a disposable database.

The validation proves that both installations can independently persist a result and complete only their own Check Run. It then rejects cross-installation run/attempt use, a stale attempt, modified repository, numeric repository ID, workflow, default-branch ref, exact commit SHA, event, runner-environment, and trust-snapshot claims. Rejected callbacks must produce zero database mutations, zero Check Run publication calls, and no other-tenant values in the response. The optional pull request comment path is deliberately unavailable for one fixture while Check Run completion succeeds with a non-blocking warning.

The uploaded target-repository-isolation-report.json is mode 0600 and aggregate-only for tenant data: it contains test counts, invariants, and the public test runner source SHA (not a customer commit). It never includes installation IDs, private repository names, customer commit values, tokens, payloads, findings, artifacts, database URLs, or raw errors. Its fixed proof block explicitly names ADR-0010 and the Cloud Control Plane Reliability milestone and sets kind: synthetic-database-adversarial and liveTwoOwnerAcceptance: false. The two installations and repositories in topology are test fixtures, not live GitHub installations. Untrusted evidence cannot elevate that boolean. The live two-owner/private-repository acceptance and production permission validation remain open in issue #154 and issue #88 (the latter is closed but has outstanding checklist items); none of those conditions is satisfied by this report.

Execution behavior

The shipped workflow:

  1. requires lowercase UUID run and execution-attempt IDs;
  2. requires target to equal github.repository;
  3. accepts only a full lowercase 40-character commit SHA;
  4. pins the callback to the explicitly configured repository-controlled BOARDREADYOPS_CLOUD_ORIGIN HTTPS origin and the exact run/attempt URL;
  5. checks out the exact commit with persisted credentials disabled;
  6. verifies the resulting Git SHA;
  7. installs and verifies KiCad 10.0.x;
  8. runs the exact BoardReadyOps Action commit pinned in the reviewed workflow;
  9. uploads JSON, SARIF, and Markdown reports as GitHub Actions artifacts;
  10. maps the JSON report to the version-one cloud result contract; and
  11. obtains an OIDC token with audience boardreadyops-cloud:<run-id>:<attempt-id>:<target-sha>:<trust-mode>:<safe-mode-reasons-or-none> and retries the callback up to three times. The final field is the canonical comma-separated safe-mode reason list, or none when empty; the control plane derives and validates the same audience from the persisted run, current attempt, commit and trust snapshot.

Blocking findings complete the cloud run with decision fail and fail the GitHub Actions workflow. Operational errors complete it with decision error when a callback can be sent.

Quota and ownership

GitHub-hosted compute minutes and Actions artifact storage belong to the target repository owner. BoardReadyOps Cloud does not provide shared KiCad compute in this mode. Public and private repository billing behavior follows the owner's GitHub plan and organization policy.

The workflow's BoardReadyOps SHA is an execution-contract pin, not the public documentation recommendation. It may intentionally lag the latest public release while cloud callback, setup-probe, and result-contract compatibility are validated. Update that operational pin only with the workflow-specific tests and commissioning evidence; user-facing examples elsewhere use the latest reviewed public release commit.

Repository administrators must permit GitHub Actions and the pinned third-party actions used by the workflow. Organizations with an allow-list must allow:

  • actions/checkout at the pinned commit;
  • actions/github-script at the pinned commit; and
  • oaslananka/boardreadyops at the pinned release commit.

Commissioning checklist

  1. Add the GitHub App installation to the target repository.
  2. Confirm the installation has Actions read/write and Checks read/write.
  3. Add boardreadyops.yml and .github/workflows/readiness-runner.yml to the default branch.
  4. Set BOARDREADYOPS_CLOUD_ORIGIN to the reviewed deployed control-plane HTTPS origin.
  5. Confirm Actions are enabled and the organization policy permits the pinned actions.
  6. Open or synchronize a non-draft, same-repository pull request.
  7. Verify the BoardReadyOps Check Run becomes queued and then in progress.
  8. Verify the target repository receives a BoardReadyOps Readiness Runner workflow run.
  9. Verify checkout resolved to the assigned SHA and KiCad 10.0.x ran.
  10. Verify the OIDC callback completes the Check Run and the dashboard shows findings and the Actions run link.
  11. Verify no target checkout exists on the control-plane host or ops-vps-03.

For continuous production-path validation across both repository visibility classes, provision and commission the synthetic target-repository canaries.

Failure modes

Symptom Likely cause
Dispatch API returns 404 Workflow is missing from the target default branch or the configured filename differs
Dispatch API returns 403 App installation lacks Actions write, Actions are disabled, or organization policy blocks dispatch
Checkout fails Assigned SHA is unavailable to the repository's GITHUB_TOKEN
KiCad install fails GitHub runner image or KiCad PPA is unavailable
Callback returns 401 OIDC repository/workflow/ref/run/attempt claims do not match persisted state
Check remains in progress Workflow stopped before callback or callback exhausted retries
Workflow fails with findings BoardReadyOps correctly returned a blocking readiness decision

Do not work around dispatch failures by widening the App beyond the declared githubAppPermissionProfile, placing customer source in a central public workflow repository, or enabling a shared VPS worker without an explicit execution-mode decision. The declared Contents write grant supports reviewed setup PRs; it does not repair target workflow dispatch failures.