File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
modules/services/continuous-integration/github-runner Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ with lib;
1919 ] )
2020 ) ;
2121
22- config . systemd . services = flip mapAttrs' config . services . github-runners ( name : cfg :
22+ config . systemd . services =
23+ let enabledRunners = filterAttrs ( _ : cfg : cfg . enable ) config . services . github-runners ;
24+ in ( flip mapAttrs' enabledRunners ( name : cfg :
2325 let
2426 svcName = "github-runner-${ name } " ;
2527 systemdDir = "github-runner/${ name } " ;
@@ -296,5 +298,5 @@ with lib;
296298 cfg . serviceOverrides
297299 ] ;
298300 }
299- ) ;
301+ ) ) ;
300302}
Original file line number Diff line number Diff line change @@ -11,6 +11,12 @@ import ./make-test-python.nix ({ pkgs, ... }:
1111 tokenFile = builtins . toFile "github-runner.token" "not-so-secret" ;
1212 } ;
1313
14+ services . github-runners . test-disabled = {
15+ enable = false ;
16+ url = "https://github.com/yaxitech" ;
17+ tokenFile = builtins . toFile "github-runner.token" "not-so-secret" ;
18+ } ;
19+
1420 systemd . services . dummy-github-com = {
1521 wantedBy = [ "multi-user.target" ] ;
1622 before = [ "github-runner-test.service" ] ;
@@ -33,5 +39,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
3339 assert "Self-hosted runner registration" in out, "did not read runner registration header"
3440
3541 machine.wait_until_succeeds("test -f /tmp/registration-connect")
42+
43+ machine.fail("systemctl list-unit-files | grep test-disabled")
3644 '' ;
3745} )
You can’t perform that action at this time.
0 commit comments