mirror of
https://codeberg.org/forgejo/docs.git
synced 2024-11-21 17:36:59 -05:00
admin: clarify the Runner label
keyword (#475)
It was quite painful yesterday to try to figure out why my workflow didn't work anymore after the Forgejo migration. Turns out that `gitea/act_runner` used a different default Docker image. With this PR, it should be clearer to other people what is the meaning of the labels. Co-authored-by: Rik Huijzer <github@huijzer.xyz> Reviewed-on: https://codeberg.org/forgejo/docs/pulls/475 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Rik Huijzer <rikh@noreply.codeberg.org> Co-committed-by: Rik Huijzer <rikh@noreply.codeberg.org>
This commit is contained in:
parent
4ff026d3ed
commit
05f8dd4b77
1 changed files with 25 additions and 0 deletions
|
@ -291,6 +291,24 @@ The `Forgejo runner` needs to connect to a `Forgejo` instance and must be regist
|
|||
The same token can be used multiple times to register any number of
|
||||
runners, independent of each other.
|
||||
|
||||
When using the `forgejo-runner register` command, it will ask for a
|
||||
label too. To get a runner that is close to GitHub's runners, use
|
||||
|
||||
```
|
||||
ubuntu-22.04:docker://node:20-bullseye
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:act-22.04
|
||||
```
|
||||
|
||||
as the label. The `act` container image is much bigger than the
|
||||
`node` image, but also more similar to the GitHub runners. See
|
||||
the [labels and `runs-on`](#labels-and-runs-on) section for
|
||||
more information.
|
||||
|
||||
- Offline registration
|
||||
|
||||
When Infrastructure as Code (Ansible, kubernetes, etc.) is used to
|
||||
|
@ -572,6 +590,13 @@ runner:
|
|||
will have the `Forgejo runner` declare that it supports the `node20` and `bullseye` labels.
|
||||
|
||||
If the list of labels is empty, it defaults to `docker:docker://node:16-bullseye` and will declare the label `docker`.
|
||||
Declaring a label means that the `Forgejo runner` will accept tasks that specify this label in the `runs-on` field.
|
||||
|
||||
So, to mimick the GitHub runners, the `runs-on` field can be set to `ubuntu-22.04:docker://node:20-bullseye` for instance.
|
||||
With this, the Forgejo runner will respond to `runs-on: ubuntu-22.04` and will use the `node:20-bullseye` image from hub.docker.com.
|
||||
This image is quite capable of running many of the workflows that are designed for the GitHub runners.
|
||||
For a slightly bigger image, use `ghcr.io/catthehacker/ubuntu:act-22.04` instead of `node:20-bullseye` which should be compatible with most actions while remaining relatively small.
|
||||
There exist larger images used that can go up to 20GB compressed with more software installed if needed.
|
||||
|
||||
### Docker or Podman
|
||||
|
||||
|
|
Loading…
Reference in a new issue