mirror of
https://codeberg.org/forgejo/docs.git
synced 2025-01-05 00:08:54 -05:00
admins: actions: one token can register multiple runners
See9b698362a3
Also remove the token line from the .runner file. It is confusing and difficult to explain because it is different from the registration token. It really is a shared secret between the runner and the Forgejo instance that has a purpose which is entirely different. (cherry picked from commit142d8a03d1
)
This commit is contained in:
parent
e72b04e51d
commit
00fcee4a33
1 changed files with 7 additions and 4 deletions
|
@ -179,6 +179,7 @@ environment. They need to be installed and configured independently.
|
|||
The `Forgejo runner` needs to connect to a `Forgejo` instance and must be registered before doing so. It will give it permission to read the repositories and send back information to `Forgejo` such as the logs or its status.
|
||||
|
||||
- Online registration
|
||||
|
||||
A special kind of token is needed and can be obtained from the `Create new runner` button:
|
||||
|
||||
- in `/admin/actions/runners` to accept workflows from all repositories.
|
||||
|
@ -191,7 +192,7 @@ The `Forgejo runner` needs to connect to a `Forgejo` instance and must be regist
|
|||
For instance, using a token obtained for a test repository from `next.forgejo.org`:
|
||||
|
||||
```shell
|
||||
forgejo-runner register --no-interactive --token {TOKEN} --name runner --instance https://next.forgejo.org --labels docker:docker://node:16-bullseye,self-hosted
|
||||
forgejo-runner register --no-interactive --token {TOKEN} --name runner --instance https://next.forgejo.org
|
||||
INFO Registering runner, arch=amd64, os=linux, version=3.0.0.
|
||||
INFO Runner registered successfully.
|
||||
```
|
||||
|
@ -204,13 +205,15 @@ The `Forgejo runner` needs to connect to a `Forgejo` instance and must be regist
|
|||
"id": 6,
|
||||
"uuid": "fcd0095a-291c-420c-9de7-965e2ebaa3e8",
|
||||
"name": "runner",
|
||||
"token": "{TOKEN}",
|
||||
"address": "https://next.forgejo.org",
|
||||
"labels": ["docker:docker://node:16-bullseye", "self-hosted"]
|
||||
"address": "https://next.forgejo.org"
|
||||
}
|
||||
```
|
||||
|
||||
The same token can be used multiple times to register any number of
|
||||
runners, independent of each other.
|
||||
|
||||
- Offline registration
|
||||
|
||||
When Infrastructure as Code (Ansible, kubernetes, etc.) is used to
|
||||
deploy and configure both Forgejo and the Forgejo runner, it may be
|
||||
more convenient for it to generate a secret and share it with both.
|
||||
|
|
Loading…
Reference in a new issue