container registry!

This commit is contained in:
kleines Filmröllchen 2025-01-27 12:13:57 +01:00
parent a55b81cece
commit 9ba49b1bb7
Signed by: filmroellchen
SSH key fingerprint: SHA256:UMhcHaeI+VGsiUL2Drpw3aj1iRiQUlx8nxZqUPvoaVw
3 changed files with 12 additions and 2 deletions

View file

@ -9,3 +9,5 @@ We provide a few containers for you to use:
- `ubuntu-latest`: A container [provided by `catthehacker`](https://ghcr.io/catthehacker/ubuntu:act-22.04) that mostly mimics the GitHub `ubuntu-latest` runner. Use this if you simply want to run CI based on existing GitHub Actions configurations. While compatibility is not guaranteed (please read the [Forgejo Actions documentation](https://forgejo.org/docs/latest/user/actions/) either way), were certain it will just work in most cases.
- `alpine`: The `alpine:latest` (aka. `edge`) container, which is the official Alpine container. Use this container if youre writing a new action. It is fast and small :)
- `alpine-latex`: An Alpine container with most TeX Live utilities preinstalled. This container is built from our [Containerfile](Containerfile.alpine-latex) once per week. Use this if you need to build LaTeX files (ideally with XeTeX) -- it saves a lot of CI time.
All three containers are also published to the [local container registry](https://git.ctbk.de/infra/-/packages), so you can test your actions locally with `forgejo-runner exec`.

View file

@ -5,5 +5,13 @@ BASEDIR=/etc/forgejo-runner
for container in "$BASEDIR"/Containerfile.*; do
base=$(basename "$container")
tag=${base#"Containerfile."}
podman build -t "$tag" --cpu-quota 50000 -f "$container" $BASEDIR
podman build -t "git.ctbk.de/infra/$tag" --cpu-quota 50000 -f "$container" $BASEDIR
podman push "git.ctbk.de/infra/$tag"
done
# extra container tags and pushes for things that we dont build, but need
podman tag data.forgejo.org/oci/alpine:latest git.ctbk.de/infra/alpine:latest
podman tag ghcr.io/catthehacker/ubuntu:act-22.04 git.ctbk.de/infra/ubuntu:act-22.04
podman push git.ctbk.de/infra/alpine:latest
podman push git.ctbk.de/infra/ubuntu:act-22.04

View file

@ -37,7 +37,7 @@ runner:
# The labels of a runner are used to determine which jobs the runner can run, and how to run them.
# If it's empty when registering, it will ask for inputting labels.
# Remember to delete .runner when you modify this, otherwise the new labels will not get applied!
labels: ["ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-22.04", "alpine:docker://data.forgejo.org/oci/alpine:latest", "alpine-latex:docker://localhost/alpine-latex:latest"]
labels: ["ubuntu-latest:docker://git.ctbk.de/infra/ubuntu:act-22.04", "alpine:docker://git.ctbk.de/infra/alpine:latest", "alpine-latex:docker://git.ctbk.de/infra/alpine-latex:latest"]
cache:
# Enable cache server to use actions/cache.