Commit Graph

5 Commits

Author SHA1 Message Date
Samuel Silva
e6ed17b918 nixos/github-runners: GitHub App authentication and multi-org runners
Add three options to `services.github-runners.<name>`:

- `githubApp`: authenticate via a GitHub App installation instead of a
  `tokenFile`. The service derives a short-lived installation token from the
  App's private key on each start, registers the runner, and de-registers it
  on stop. The PEM key is a deployed secret, never copied into the store.

- `count`: fan a single entry out into N identical runner services.
  `github-runner-<name>` is unchanged for `count == 1`, suffixed `-<n>` for
  `count > 1`.

- `orgs`: serve several organisations (or repositories) from one entry,
  fanning out into `github-runner-<name>-<org>-<n>`. The entry-level auth is
  shared across orgs and only the App `login` changes per org; the per-org
  `count` defaults to the entry-level `count`.

This brings the multi-org consumption shape of the soon-to-be-removed srvos
runner role (nix-community/srvos#836, nix-community/srvos#837) into nixpkgs.
An entry without `orgs` and with the default `count = 1` is unchanged, so
existing runners do not re-register.
2026-06-19 15:21:54 -03:00
Piotr Kwiecinski
754a229d74 nixosTests.github-runner: migrate to runTest
Part of #386873
2025-04-05 00:01:55 +02:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Bryan Richter
588b1f8df6 nixos/github-runners: make enable functional
Fixes #305304
2024-09-20 09:09:17 +03:00
Vincent Haupert
e8df83d417 nixos/tests/github-runner: init 2023-02-26 15:39:19 +01:00