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>
This commit is contained in:
1 parent
460bdbe380
commit
d1c7c55700
7 files changed
+43
-10
No files matched your search
@@ -11,8 +11,10 @@ runner:
|
||||
# shutdown_timeout lets running jobs finish when the runner stops, as it
|
||||
# does before an update reboots the machine.
|
||||
shutdown_timeout: 1h
|
||||
# labels names the job image of jobs with runs-on: linux, which
|
||||
# gitea-runner.service loads at boot.
|
||||
labels:
|
||||
- linux:docker://quay.io/fedora/fedora:45
|
||||
- linux:docker://localhost/runneros-job
|
||||
container:
|
||||
# privileged lets jobs build OS images, as this repository's own workflow
|
||||
# does. A job can then take over the machine, so only run jobs you trust.
|
||||
|
||||
@@ -14,10 +14,11 @@ Requires=podman.socket
|
||||
# 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 pulls the image of the linux label in
|
||||
# /etc/gitea-runner/config.yaml, so the first job after a boot doesn't wait
|
||||
# for it. The runner still starts if it fails.
|
||||
ExecStartPre=-/usr/bin/podman pull -q quay.io/fedora/fedora:45
|
||||
# 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
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
d /var/lib/gitea-runner 0700
|
||||
|
||||
# The storage of root's podman is wiped at every boot, so images and leftovers
|
||||
# of jobs don't pile up. Jobs pull their images again.
|
||||
# of jobs don't pile up. gitea-runner.service loads the job image again.
|
||||
R /var/lib/containers/storage
|
||||
Reference in new issue
Block a user