Files
runneros/mkosi.extra/usr/lib/systemd/system/gitea-runner.service
T
Job79andClaude Opus 5.5 d1c7c55700
os / os (push) Failing after 2m42s
Run jobs in our own job image
mkosi.images/job/ builds an OCI image with git, Node.js 26 and dnf, and
the OS ships it in /usr, so it is signed and updated with the OS.
gitea-runner.service loads it at boot instead of pulling Fedora, and
JavaScript actions work without installing Node.js in each job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 17:48:04 +00:00

26 lines
1.1 KiB
Desktop File

# gitea-runner.service runs the Gitea Actions runner, which runs each job in a
# container on root's podman. gitea-runner.path starts it once it is
# registered. It runs as root: whoever has podman's socket is root anyway.
#
# TimeoutStopSec is a bit longer than runner.shutdown_timeout in
# /etc/gitea-runner/config.yaml, so running jobs can finish on stop.
[Unit]
Description=Gitea Actions runner
Wants=network-online.target
After=network-online.target podman.socket
Requires=podman.socket
[Service]
# HOME holds the cache of actions/cache, next to the registration.
Environment=HOME=/var/lib/gitea-runner
Environment=DOCKER_HOST=unix:///run/podman/podman.sock
# ExecStartPre loads the job image (mkosi.images/job/) from /usr into podman,
# whose storage is wiped at every boot, under the name that the linux label in
# /etc/gitea-runner/config.yaml uses. podman names nothing it pulls from an
# OCI directory, hence the tag.
ExecStartPre=/bin/sh -c 'podman tag "$(podman pull -q oci:/usr/lib/runneros/job)" localhost/runneros-job'
ExecStart=/usr/bin/gitea-runner -c /etc/gitea-runner/config.yaml daemon
Restart=on-failure
RestartSec=10s
TimeoutStopSec=65min