From 50b7ee1b5c600f5648689cd562f64333223a5f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Mon, 24 Aug 2026 11:55:54 +0200 Subject: [PATCH] fix(gitea): migrate to gitea/runner image, fix daemon config not loading The renamed gitea/runner project (v1.0.0+) is a straight rename of act_runner with the binary renamed to gitea-runner. While inspecting its run.sh, found the actual root cause of the cache config being ignored all along: run.sh builds --config from the CONFIG_FILE env var, not from any command: override - it always execs the binary itself regardless of passed args. The runner service never set CONFIG_FILE, so runner-config.yaml was never actually loaded by the daemon despite being correctly mounted. --- gitea/compose.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/gitea/compose.yml b/gitea/compose.yml index 87bc85f..750a644 100644 --- a/gitea/compose.yml +++ b/gitea/compose.yml @@ -63,10 +63,9 @@ services: networks: - compose_network runner: - image: gitea/act_runner:latest + image: gitea/runner:latest container_name: gitea_runner privileged: true - command: ["act_runner", "daemon", "--config", "/data/config.yaml"] environment: TZ: ${TIMEZONE:-Europe/Amsterdam} GITEA_INSTANCE_URL: https://${TRAEFIK_HOST} @@ -74,6 +73,13 @@ services: GITEA_RUNNER_NAME: docker-runner GITEA_RUNNER_LABELS: ubuntu-latest:docker://catthehacker/ubuntu:act-latest,ubuntu-22.04:docker://catthehacker/ubuntu:act-22.04,ubuntu-20.04:docker://catthehacker/ubuntu:act-20.04 DOCKER_HOST: unix:///var/run/docker.sock + # run.sh (the image's entrypoint script) builds its --config arg from + # this env var, not from any `command:` override - it always execs the + # binary itself and ignores compose's command/args entirely. This was + # almost certainly why runner-config.yaml's cache settings never took + # effect despite being correctly mounted: without CONFIG_FILE set, the + # daemon never even loaded that file. + CONFIG_FILE: /data/config.yaml # Lets this container itself resolve host.docker.internal too (used by # cache.external_server in runner-config.yaml) - the daemon needs this # for its own pre-registration calls to runner-cache-server, separately @@ -89,13 +95,13 @@ services: networks: - compose_network runner-cache-server: - image: gitea/act_runner:latest + image: gitea/runner:latest container_name: gitea_runner_cache # The image's default entrypoint (run.sh) ignores any command args and - # always registers-then-execs `act_runner daemon` regardless - it has no - # cache-server mode. Bypass it entirely and invoke act_runner directly. + # always registers-then-execs `gitea-runner daemon` regardless - it has no + # cache-server mode. Bypass it entirely and invoke the binary directly. entrypoint: ["/sbin/tini", "--"] - command: ["act_runner", "cache-server", "--config", "/data/config.yaml", "--host", "0.0.0.0", "--port", "8088", "--dir", "/data/cache"] + command: ["gitea-runner", "cache-server", "--config", "/data/config.yaml", "--host", "0.0.0.0", "--port", "8088", "--dir", "/data/cache"] environment: TZ: ${TIMEZONE:-Europe/Amsterdam} ports: