From d35b14d1ccd4f2d652b91b8c6b94e54f8d40ecab Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Mon, 17 Apr 2023 13:07:13 -0400 Subject: [PATCH] add CLI command to register runner tokens (#23762) This is a CLI command to generate new tokens for the runners to register with Fix https://github.com/go-gitea/gitea/issues/23643 --------- Co-authored-by: delvh --- doc/administration/command-line.en-us.md | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/doc/administration/command-line.en-us.md b/doc/administration/command-line.en-us.md index d3362e57..4d01d6e6 100644 --- a/doc/administration/command-line.en-us.md +++ b/doc/administration/command-line.en-us.md @@ -551,3 +551,28 @@ Restore-repo restore repository data from disk dir: - `--owner_name lunny`: Restore destination owner name - `--repo_name tango`: Restore destination repository name - `--units `: Which items will be restored, one or more units should be separated as comma. wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments are allowed. Empty means all units. + +### actions generate-runner-token + +Generate a new token for a runner to use to register with the server + +- Options: + - `--scope {owner}[/{repo}]`, `-s {owner}[/{repo}]`: To limit the scope of the runner, no scope means the runner can be used for all repos, but you can also limit it to a specific repo or owner + +To register a global runner: + +``` +gitea actions generate-runner-token +``` + +To register a runner for a specific organization, in this case `org`: + +``` +gitea actions generate-runner-token -s org +``` + +To register a runner for a specific repo, in this case `username/test-repo`: + +``` +gitea actions generate-runner-token -s username/test-repo +```