Files
platform-core/infrastructure/ci/gitea-runner/config.yaml
T
DongHyeonka 69c3a732d5 feat(ci): add the desktop Gitea Actions runner configuration
The template repositories need a real runner for their CI, and the
owner chose one container on the desktop host (the k3s node).

Add compose.yaml and config.yaml for the official Gitea Runner 5.4.1
dind image, pinned by index digest, plus the operating guide. The
runner has capacity 1, one ubuntu-latest label pinned to
runner-images ubuntu-24.04-v26.11.03 by digest, restart: always, and
a 6 CPU / 10g cap (no more than half of the 12 cores and 31GiB).
Jobs use the dind daemon through the runner's Docker proxy for
Testcontainers; the host Docker socket is never mounted, job
containers stay unprivileged, valid_volumes is empty, and sweep
removes what a job created.

Dropped alternatives: the deprecated gitea/act_runner 0.6.1 (moved
to gitea/runner), the basic image with the host docker.sock (jobs
would own the host daemon), and dind-rootless (Testcontainers
compatibility needs separate checks).

Risk: the runner container is privileged; a job can still start a
privileged container on the inner daemon, so only trusted repository
workflows should run here. Runner jobs do not take the desktop's
heavy-work lock; the CPU and memory caps are the only guard.

Verification: config keys checked with `gitea-runner config get`,
`docker compose config` passes, the runner registered at user scope
and the Gitea API shows desktop-runner online and idle; it came back
online after `docker restart` without registering again.
2026-11-07 18:36:55 +09:00

39 lines
1.5 KiB
YAML

# Gitea Runner 5.4.1 configuration for the single desktop runner.
# Every key not listed here keeps the default printed by
# `gitea-runner config generate` for that version.
log:
level: info
runner:
# The dind image starts in /data, a named volume. The registration file
# holds the runner credential and must stay on that volume.
file: .runner
# One job at a time. The desktop also runs other build and Docker work.
capacity: 1
# The only label. runs-on: ubuntu-latest runs in this image, pinned by tag
# and index digest so a moved tag cannot change the job environment.
labels:
- "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-24.04-v26.11.03@sha256:b96ba465021b1a4c6a1c9e79220c2b9bfad0f29b09dbb528bbfb35411443a3a4"
cache:
enabled: true
dir: /data/cache
# The desktop root disk is shared. Bound the actions/cache store.
size_limit: 5GB
container:
# Job containers stay unprivileged. Workflow options that could escape the
# container (--privileged, --cap-add, --device, ...) are dropped.
privileged: false
# Workflows may not bind-mount runner volumes or host paths.
valid_volumes: []
# Empty: jobs get the runner's own Docker daemon (the dind daemon inside
# the runner container) through the runner's Docker proxy, so
# Testcontainers works. The host Docker socket is never mounted.
docker_host: ""
# CI-only runner: remove the containers, networks and volumes a job
# created through the proxy when the job ends.
sweep: true
force_pull: false