An age-based prune does not cap disk use: the cache grows with how often new image versions are published, and builds on the runner then fail for lack of space. Keep the newest N image IDs per repository in the weekly prune, and add an hourly pressure prune that runs the count prune and a capped builder prune when the Docker root's filesystem passes a threshold, behind the same job gate. Both are off by default. Refs #319 Assisted-by: Claude Code
98 lines
4.7 KiB
YAML
98 lines
4.7 KiB
YAML
---
|
|
gitea_runner_remove_data: false
|
|
gitea_runner_remove: false
|
|
# Set true to force re-registration (e.g. after gitea_runner_instance_url or
|
|
# gitea_runner_registration_scope changes): mints the token, stops the daemon, removes the
|
|
# existing .runner file, then re-registers. Refused under CI. The old runner stays in Gitea as
|
|
# offline: delete it in Site Administration > Actions > Runners.
|
|
# The old registration is kept as .runner.bak.<timestamp> (0600); only the most recent backup is
|
|
# kept, previous ones are pruned before each forced run. Rollback:
|
|
# cp .runner.bak.<timestamp> .runner && systemctl restart gitea-runner
|
|
gitea_runner_force_register: false
|
|
|
|
# Runner logging
|
|
gitea_runner_log_level: info
|
|
|
|
# Runner behavior
|
|
# Jobs run at the same time (`runner.capacity`); size the host's memory and cores for it.
|
|
gitea_runner_capacity: 1
|
|
|
|
# Labels exposed to Gitea Actions
|
|
gitea_runner_labels:
|
|
- docker
|
|
- ubuntu-lxc
|
|
|
|
# Container executor settings
|
|
gitea_runner_container_privileged: false
|
|
gitea_runner_container_docker_host: unix:///var/run/docker.sock
|
|
|
|
# Weekly Docker prune (systemd timer). Off by default.
|
|
# The ages filter on creation time of the image, not on when it was pulled.
|
|
gitea_runner_docker_prune_enabled: false
|
|
gitea_runner_docker_prune_schedule: "Sun *-*-* 04:30:00"
|
|
gitea_runner_docker_prune_container_age: 24h
|
|
gitea_runner_docker_prune_image_age: 168h
|
|
# Seconds. The prune skips while a container younger than this runs and ignores older ones as
|
|
# leaked. Keep it above the longest job timeout.
|
|
gitea_runner_docker_prune_job_max_age: 21600
|
|
# Newest image IDs kept per repository by the weekly and pressure prunes; 0 = off.
|
|
gitea_runner_docker_prune_keep_per_repository: 0
|
|
# Use % of the Docker root's filesystem at which the pressure prune runs; 0 = off. Needs the count.
|
|
gitea_runner_docker_prune_disk_threshold_percent: 0
|
|
gitea_runner_docker_prune_disk_check_schedule: hourly
|
|
gitea_runner_docker_prune_builder_keep_storage: 10GB
|
|
|
|
# Optional extra mounts
|
|
# gitea_runner_container_volumes:
|
|
# - /cache:/cache
|
|
|
|
gitea_runner_update: false
|
|
gitea_runner_version: "6.0.1"
|
|
|
|
# Gitea Runner defaults
|
|
gitea_runner_user: "gitea-runner"
|
|
gitea_runner_group: "gitea-runner"
|
|
gitea_runner_home: "/home/gitea-runner"
|
|
# Upstream renamed the project (and its release artifacts) from act_runner
|
|
# to gitea-runner; the old act_runner/... path now 301s to a 404.
|
|
gitea_runner_download_url: "https://dl.gitea.com/gitea-runner/{{ gitea_runner_version }}/gitea-runner-{{ gitea_runner_version }}-linux-amd64"
|
|
gitea_runner_checksum_url: "https://dl.gitea.com/gitea-runner/{{ gitea_runner_version }}/gitea-runner-{{ gitea_runner_version }}-linux-amd64.sha256"
|
|
gitea_runner_install_dir: "/usr/local/bin"
|
|
gitea_runner_work_dir: "/var/lib/gitea-runner"
|
|
gitea_runner_service_unit: "/etc/systemd/system/gitea-runner.service"
|
|
# No role default: set in inventory. Required only when the runner registers (asserted in
|
|
# tasks/mint_token.yml).
|
|
gitea_runner_name: ""
|
|
gitea_runner_instance_url: ""
|
|
# Inventory host that has Gitea installed and mints the registration token.
|
|
gitea_runner_token_host: ""
|
|
# Who the runner takes jobs from: empty = instance-wide, an owner (user or organisation) or
|
|
# owner/repo. Read only when registering: on an already registered runner a change takes
|
|
# effect with gitea_runner_force_register.
|
|
gitea_runner_registration_scope: ""
|
|
|
|
# How the delegated token command runs on gitea_runner_token_host. Keep in step with
|
|
# the gitea role on that host (separate variables, resolved per play).
|
|
gitea_runner_gitea_install_dir: "/usr/local/bin"
|
|
gitea_runner_gitea_user: "git"
|
|
gitea_runner_gitea_app_dir: "/etc/gitea"
|
|
|
|
# Optional molecule tooling for role tests. A host-executor label runs the molecule job on this
|
|
# host, against its own Docker daemon, so no job container needs the Docker socket. The tooling
|
|
# lives in a venv and is installed at provision time, so a CI run installs nothing.
|
|
# A job on that label runs as the runner user, who is in the docker group, so it is
|
|
# root-equivalent on this host: see Notes in the README before enabling it.
|
|
gitea_runner_molecule_enabled: false
|
|
gitea_runner_molecule_label: molecule
|
|
gitea_runner_molecule_venv: /opt/molecule-venv
|
|
gitea_runner_molecule_collections_path: /opt/molecule-collections
|
|
# Collections requirements file, on the control host, that the molecule install reads. No
|
|
# default: required when gitea_runner_molecule_enabled is true.
|
|
gitea_runner_collections_requirements_file: ""
|
|
gitea_runner_molecule_version: "26.11.0"
|
|
gitea_runner_molecule_plugins_version: "26.11.0"
|
|
# Held below 2.22: ansible-core 2.22 requires Python 3.13 or newer, and the venv uses the
|
|
# system Python of Ubuntu 24.04 (3.12).
|
|
gitea_runner_molecule_ansible_core_version: "2.21.6"
|
|
gitea_runner_molecule_docker_sdk_version: "7.2.0"
|