Skip to content

Architecture / Decision records / ADR-HIS-072

ADR-HIS-072 The pipeline runs on self-hosted runners, chosen by a repository variable

Status Accepted
Decided 2026-11-26 by the repository owner
Record Drafted 2026-11-26; approved 2026-11-30 by the Enterprise Architecture Board; amended 2026-12-01 (web packages build on hosted runners, point 4), amendment approved 2026-12-02 by the Enterprise Architecture Board
Where the rule lives .github/workflows/*.yml (runs-on), the repository variable HIS_RUNS_ON, platform/delivery-pipeline/README.md ("Where the jobs run")

Context

The pull request pipeline of ADR-HIS-046 ran on GitHub's hosted runners. The session launcher reviews and merges a pull request only once its checks have passed (ADR-HIS-040). So the delivery of every session depends on hosted Actions minutes, which are limited and paid for on a private repository. The pipeline's scripts need only Docker, and the workflows install Java, Node.js and Python, so the jobs can run on any Linux host.

Decision

  1. Every job's runs-on reads the repository variable HIS_RUNS_ON, a JSON value: ${{ fromJSON(vars.HIS_RUNS_ON || '"ubuntu-latest"') }}. Unset, the jobs run on GitHub's hosted runners, as before.
  2. The project runs its own runners with the label his, and HIS_RUNS_ON is ["self-hosted","his"]. Two runner services, each taking one job at a time, run on one Linux host as the user his-runner, each with its own scanner cache.
  3. Switching is a settings change, not a commit. If the runners are down for longer than an outage should last, unsetting the variable sends later runs back to hosted runners.
  4. Web packages build on GitHub's hosted runners (amended 2026-12-01). The build job of a folder under web/ runs on ubuntu-latest whatever HIS_RUNS_ON says. On the shared self-hosted host, with CPU steal time around 50 to 70%, their timing-sensitive component tests failed at random in screens a change had not touched, and blocked unrelated pull requests (#75, #76). They need no Docker database, so they cost few hosted minutes; the heavy Java, platform and scanner jobs stay on the self-hosted runners.

Consequences

  • Pipeline runs use no hosted Actions minutes. Results, logs and SBOM artifacts stay in GitHub as before, and the launcher is unchanged.
  • With two runners, a typical pull request's checks take about as long as on hosted runners (a few minutes). A change that runs many jobs, such as one touching web/shell (16 jobs), or a burst of pushes, waits in the queue. More runners can be added with the label his.
  • While no runner is online, jobs wait and checks stay pending: nothing merges. The pipeline fails closed.
  • The jobs run pull request code with Docker access on the runner host. Session agents already build that code on the same host, and the runners run as their own user, away from other credentials. Only branches of this private repository start jobs.
  • GitHub Actions still schedules the jobs. This decision covers limited or paid minutes, not Actions being unavailable.