summary refs log tree commit diff
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2022-03-10 11:11:23 +0100
committerProfpatsch <mail@profpatsch.de>2022-03-11 10:26:39 +0100
commit75b08e3624e51b11247c1482bf5378d5d8be7b5f (patch)
tree7a05e67827c293c82cdbac028e1a286a687b74c0
parent8cb0de0d60b8aa88b774530e4c6786896878f814 (diff)
downloadnixpkgs-75b08e3624e51b11247c1482bf5378d5d8be7b5f.tar
nixpkgs-75b08e3624e51b11247c1482bf5378d5d8be7b5f.tar.gz
nixpkgs-75b08e3624e51b11247c1482bf5378d5d8be7b5f.tar.bz2
nixpkgs-75b08e3624e51b11247c1482bf5378d5d8be7b5f.tar.lz
nixpkgs-75b08e3624e51b11247c1482bf5378d5d8be7b5f.tar.xz
nixpkgs-75b08e3624e51b11247c1482bf5378d5d8be7b5f.tar.zst
nixpkgs-75b08e3624e51b11247c1482bf5378d5d8be7b5f.zip
modules/github-runner: Improve description of `url`
We spent a whole afternoon debugging this, because upstream has very
bad software quality and the error messages were incredibly
misleading.

So let’s document it for the sanity of other people.

Btw, I think the implementation of our module is pretty brittle,
especially the part about diffing tokens to check whether they
changed. We should rather just request a new builder registration
every time, it’s not that much overhead, and always set `replace` so
it is idempotent.
-rw-r--r--nixos/modules/services/continuous-integration/github-runner.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/modules/services/continuous-integration/github-runner.nix b/nixos/modules/services/continuous-integration/github-runner.nix
index c3bd8f99c57..a7645e1f56e 100644
--- a/nixos/modules/services/continuous-integration/github-runner.nix
+++ b/nixos/modules/services/continuous-integration/github-runner.nix
@@ -34,6 +34,14 @@ in
         Repository to add the runner to.
 
         Changing this option triggers a new runner registration.
+
+        IMPORTANT: If your token is org-wide (not per repository), you need to
+        provide a github org link, not a single repository, so do it like this
+        <literal>https://github.com/nixos</literal>, not like this
+        <literal>https://github.com/nixos/nixpkgs</literal>.
+        Otherwise, you are going to get a <literal>404 NotFound</literal>
+        from <literal>POST https://api.github.com/actions/runner-registration</literal>
+        in the configure script.
       '';
       example = "https://github.com/nixos/nixpkgs";
     };