Switch to forgejo runner

This commit is contained in:
Mathieu Strypsteen 2024-09-13 20:48:11 +02:00
parent 581fcf9ff1
commit 02c8707ac6
Signed by: mathieu
GPG key ID: 782A42E461BC6824
5 changed files with 8 additions and 26 deletions

View file

@ -1,2 +1,5 @@
container:
docker_host: '-'
options: --userns=host
runner:
labels: ["debian-12:docker://node:bookworm"]

View file

@ -1,19 +1,10 @@
[Unit]
Requires=podman-container.service
After=podman-container.service
[Service]
ExecStartPre=sleep 5
[Container]
Image=docker.io/gitea/act_runner
Volume=podman-run.volume:/run/podman:U,z
Image=code.forgejo.org/forgejo/runner:3.5.1
SecurityLabelDisable=true
Exec=forgejo-runner daemon -c /etc/act-runner/config.yaml
Volume=/run/podman:/run/podman:U
Volume=/var/lib/system-config/container-config/act-runner/config.yaml:/etc/act-runner/config.yaml:z,ro
Volume=act-runner.volume:/data:U,Z
Tmpfs=/root/.cache
Environment=CONFIG_FILE=/etc/act-runner/config.yaml
Environment=GITEA_INSTANCE_URL=https://git.strypsteen.com
Environment=GITEA_RUNNER_NAME=home
Environment=GITEA_RUNNER_LABELS=debian-12:docker://node:bookworm
Secret=GITEA_RUNNER_REGISTRATION_TOKEN,type=env
AutoUpdate=registry
[Install]
WantedBy=multi-user.target

View file

@ -1,13 +0,0 @@
[Container]
Image=registry.access.redhat.com/ubi9/podman
UserNS=host
SecurityLabelDisable=true
Unmask=/proc/sys
AddDevice=/dev/net/tun
Exec=sh -c "echo podman:10000:70000 > /etc/subuid && echo podman:10000:70000 > etc/subgid && chmod 777 /run/podman && su podman -c 'podman system service -t0 unix:///run/podman/podman.sock'"
Volume=podman-run.volume:/run/podman:U,z
Tmpfs=/etc
Tmpfs=/home/podman/.cache
AutoUpdate=registry
[Install]
WantedBy=multi-user.target

View file

@ -2,3 +2,4 @@
set -euo pipefail
cp -R sandbox/* /
sh setup-server.sh
systemctl enable --now podman.socket