From be1811edb1f2f4be4b201fea65187c796d28fcd4 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sun, 20 Jul 2025 14:52:51 -0700 Subject: [PATCH] nixos/services.github-runners: handle github oauth access tokens --- .../services/continuous-integration/github-runner/service.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/continuous-integration/github-runner/service.nix b/nixos/modules/services/continuous-integration/github-runner/service.nix index aaf8083dc5b9..fc334b147f4d 100644 --- a/nixos/modules/services/continuous-integration/github-runner/service.nix +++ b/nixos/modules/services/continuous-integration/github-runner/service.nix @@ -187,7 +187,7 @@ # If the token file contains a PAT (i.e., it starts with "ghp_" or "github_pat_"), we have to use the --pat option, # if it is not a PAT, we assume it contains a registration token and use the --token option token=$(<"${newConfigTokenPath}") - if [[ "$token" =~ ^ghp_* ]] || [[ "$token" =~ ^github_pat_* ]]; then + if [[ "$token" =~ ^gh[a-z]+_* ]] || [[ "$token" =~ ^github_pat_* ]]; then args+=(--pat "$token") else args+=(--token "$token")