Appearance
0046: Move the code and the pipeline to GitHub
Decided 2026-11-06. Decided by: Product Owner.
Context
The code, issues, pull requests and CI lived on a self-hosted git host that was retired on 2026-11-06, with two runners on the Mac mini. Three things made that costly:
- DH-13 / P1 was open. Production secrets (
DOPPLER_TOKEN_PRD, and the migration tokenDOPPLER_TOKEN) sat in the deploy runner's own environment. Any branch could name that runner in its own copy of the workflow and read them (#71). That host had no way to restrict a runner or a secret tomain, so the plan's answer was #71 stage 2: a pull-based deploy agent and builder outside its Actions. That is a lot of new infrastructure, and slice 1 of the deploy-hardening plan waits on it. - The SGE plugin speaks GitHub. On the old host it needed a project skill, host overrides in
.claude/settings.jsonand an extra MCP server, and some steps had no equivalent. - Operations. The old host's API could not re-run jobs, the UI Re-run had returned a 500, and a Mac mini that is off stopped every check, the deploy and the 15-minute health monitor.
On 2026-11-06 the repository was pushed, with its full history and the same issue numbers, to GitHub as FEAW-Serv/getmy-books (private).
Decision
- GitHub is the git host.
originishttps://github.com/FEAW-Serv/getmy-books.git. Issues and pull requests usegh; the SGE plugin runs natively. - One pipeline,
.github/workflows/.ci.yml,health.yml,performance.ymlandrenovate.ymlare ported with every job's behaviour kept. Each job reports as a check on the commit. - Runners. Jobs that need nothing on the LAN run on GitHub's
ubuntu-latest:verify,security,n1-compat,build-image,smoke-nas(it checks through the public tunnel),deploy-docs(Cloudflare),alert-main-failed(ntfy), Health and Performance. Jobs that must reach the NAS on the LAN,migrate-nasanddeploy-nas, run on[self-hosted, getmy-books-deploy]: one repository-scoped runner on the Mac mini. Health moving off the Mac mini means the monitor keeps running when the Mac mini is off. - DH-13 closed by a GitHub environment. Every production secret is a secret of the environment
production, never a repository secret, and that environment's deployment branches aremainonly. Every job that reads one namesenvironment: production, and none of those jobs runs for a pull request (theirif:requires a push or a manual run ofrefs/heads/main). A pull request or branch that edits a workflow to name the environment is refused its secrets by GitHub, not by our YAML.tests/infra/ci-workflow.test.tsfails if a job reads a production secret outside the environment, if an environment job can run onpull_request, ifpull_request_targetappears, or if a workflow lackspermissions: contents: readat the top and in every job. Secrets are given to the steps that use them only, not to the whole job. - The deploy guard (#297, PR #329) stays.
deploy-nasandsmoke-nasread main's head withgit ls-remote origin refs/heads/main, through theGITHUB_TOKEN(contents: read) thatactions/checkoutleaves for origin, and skip a commit main has moved past. - The image registry, when slice 1 builds it, is GitHub's:
ghcr.io/feaw-serv/getmy-books. Nothing pushes an image yet. - NAS reads of the repository need a token. The repository is private. The NAS receives code over SSH from
deploy-nasand pulls nothing from git, so only the optional daily drift check against main's manifest (getmy-books-drift-check URL) reads GitHub. It sends a fine-grained, read-only token (this repository, Contents: read) from a root-ownedrepo-read.envwhen one is installed. The token is an owner step.
What this supersedes
- ADR 0019, the deploy flow host: the pipeline is GitHub Actions, and
DOPPLER_TOKEN_PRDis an environment secret, not a runner variable. - ADR 0028, the container registry and the reason keyless Sigstore was ruled out (GitHub is an OIDC issuer Fulcio accepts, so it is now an option for slice 1, not a decision).
- ADR 0039, the docs build default: it now defaults
REPO_URLtohttps://github.com/FEAW-Serv/getmy-booksand uses GitHub's link paths. - Deploy-hardening plan, P1 option 2 and DH-13 (#71 stage 2, a pull-based deploy agent and builder outside the old host's Actions): replaced by decision 4.
- ADRs 0014, 0023, 0026, 0027 and 0030 describe the previous host as a matter of record; each carries a dated note pointing here and is otherwise unchanged.
Consequences
- Production secrets can no longer be read from a branch: P1 closes once a branch run is shown not to get them.
- GitHub's hosted runners are on the internet and are not the Mac mini, so
deploy-docs,smoke-nas,alert-main-failedand Health sendDOPPLER_TOKEN_PRDto a GitHub-hosted VM for the job's length. They are main-only and environment-gated. If a Doppler service token is ever restricted by source address, those jobs need GitHub's address ranges or the self-hosted runner. - The self-hosted runner runs
container:jobs, which GitHub supports on Linux only. It runs inside Linux on the Mac mini (the Colima VM or a container in it), with Colima LAN routing and the NAS deploy key'sfrom=list covering both of the Mac mini's interfaces. - Each environment job records a deployment on
production, so Health records one every 15 minutes. Required reviewers on the environment would hold every Health run and every alert, so they are not recommended. - GitHub can re-run a job (
gh run rerun), which eases P3; the deploy guard still stops an old run deploying over a newer main. - The sale documents now name a GitHub repository, which transfers between organisations with its history, issues and pull requests.