From fd400960853d84d229675b6eddd29666560c4c97 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Fri, 28 Apr 2023 17:29:20 +0200 Subject: [PATCH] docs: 1.20: cherry-pick admin/command-line.md * 4014200021a1997283c779a815fe9e5febf1fda1 --- admin/command-line.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/admin/command-line.md b/admin/command-line.md index 140a2797..b4d762ca 100644 --- a/admin/command-line.md +++ b/admin/command-line.md @@ -536,3 +536,28 @@ Restore-repo restore repository data from disk dir: - `--owner_name `: Restore destination owner name - `--repo_name `: 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: + +``` +forgejo actions generate-runner-token +``` + +To register a runner for a specific organization, in this case `org`: + +``` +forgejo actions generate-runner-token -s org +``` + +To register a runner for a specific repo, in this case `username/test-repo`: + +``` +forgejo actions generate-runner-token -s username/test-repo +```