···4242 type = types.path;
4343 description = lib.mdDoc ''
4444 The full path to a file which contains either a runner registration token or a
4545- personal access token (PAT).
4545+ (fine-grained) personal access token (PAT).
4646 The file should contain exactly one line with the token without any newline.
4747 If a registration token is given, it can be used to re-register a runner of the same
4848 name but is time-limited. If the file contains a PAT, the service creates a new
4949 registration token on startup as needed. Make sure the PAT has a scope of
5050 `admin:org` for organization-wide registrations or a scope of
5151- `repo` for a single repository.
5151+ `repo` for a single repository. Fine-grained PATs need read and write permission
5252+ to the "Adminstration" resources.
52535354 Changing this option or the file's content triggers a new runner registration.
5455 '';
···134134 ${optionalString (cfg.runnerGroup != null) "--runnergroup ${escapeShellArg cfg.runnerGroup}"}
135135 ${optionalString cfg.ephemeral "--ephemeral"}
136136 )
137137- # If the token file contains a PAT (i.e., it starts with "ghp_"), we have to use the --pat option,
137137+ # If the token file contains a PAT (i.e., it starts with "ghp_" or "github_pat_"), we have to use the --pat option,
138138 # if it is not a PAT, we assume it contains a registration token and use the --token option
139139 token=$(<"${newConfigTokenPath}")
140140- if [[ "$token" =~ ^ghp_* ]]; then
140140+ if [[ "$token" =~ ^ghp_* ]] || [[ "$token" =~ ^github_pat_* ]]; then
141141 args+=(--pat "$token")
142142 else
143143 args+=(--token "$token")