From 8136cc18aa7f9ffd75be09adafbdf5cc41b5ae4d Mon Sep 17 00:00:00 2001 From: ryuupendragon Date: Tue, 24 Feb 2026 19:18:50 +0530 Subject: [PATCH] Update gitea runner --- .../{docker-compose.yml => compose.yaml} | 2 + gitea-runner/config.yml | 33 ++++++++++----- gitea-runner/docker-compose-multi.yml | 42 ------------------- 3 files changed, 25 insertions(+), 52 deletions(-) rename gitea-runner/{docker-compose.yml => compose.yaml} (93%) delete mode 100644 gitea-runner/docker-compose-multi.yml diff --git a/gitea-runner/docker-compose.yml b/gitea-runner/compose.yaml similarity index 93% rename from gitea-runner/docker-compose.yml rename to gitea-runner/compose.yaml index 6373b7f..fc98f32 100644 --- a/gitea-runner/docker-compose.yml +++ b/gitea-runner/compose.yaml @@ -12,3 +12,5 @@ services: - ./config.yml:/config.yml - ./data:/data - /var/run/docker.sock:/var/run/docker.sock + ports: + - ${PORT}:${PORT} diff --git a/gitea-runner/config.yml b/gitea-runner/config.yml index f12c1b7..b08802e 100644 --- a/gitea-runner/config.yml +++ b/gitea-runner/config.yml @@ -32,31 +32,40 @@ runner: fetch_timeout: 5s # The interval for fetching the job from the Gitea instance. fetch_interval: 2s + # The github_mirror of a runner is used to specify the mirror address of the github that pulls the action repository. + # It works when something like `uses: actions/checkout@v4` is used and DEFAULT_ACTIONS_URL is set to github, + # and github_mirror is not empty. In this case, + # it replaces https://github.com with the value here, which is useful for some special network environments. + github_mirror: '' # The labels of a runner are used to determine which jobs the runner can run, and how to run them. # Like: "macos-arm64:host" or "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest" # Find more images provided by Gitea at https://gitea.com/docker.gitea.com/runner-images . # If it's empty when registering, it will ask for inputting labels. # If it's empty when execute `daemon`, will use labels in `.runner` file. labels: - - "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest" - - "ubuntu-arm64:docker://docker.gitea.com/runner-images:ubuntu-latest" - - "ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04" - - "ubuntu-cat:docker://ghcr.io/catthehacker/ubuntu:act-latest" - - "bookworm:docker://node:20-bookworm" - - "bookworm-slim:docker://node:24-bookworm-slim" - - "bullseye:docker://node:20-bullseye" - - "bullseye-slim:docker://node:20-bullseye-slim" + - "ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-24.04" + - "ubuntu-latest-full:docker://ghcr.io/catthehacker/ubuntu:full-24.04" + - "ubuntu-arm64:docker://ghcr.io/catthehacker/ubuntu:act-24.04" + - "ubuntu-arm64-full:docker://ghcr.io/catthehacker/ubuntu:full-24.04" + - "ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:act-22.04" + - "ubuntu-22.04-full:docker://ghcr.io/catthehacker/ubuntu:full-22.04" + - "trixie:docker://node:25-trixie" + - "trixie-slim:docker://node:25-trixie-slim" + - "bookworm:docker://node:25-bookworm" + - "bookworm-slim:docker://node:25-bookworm-slim" + - "bullseye:docker://node:25-bullseye" + - "bullseye-slim:docker://node:25-bullseye-slim" cache: # Enable cache server to use actions/cache. - enabled: false + enabled: true # The directory to store the cache data. # If it's empty, the cache data will be stored in $HOME/.cache/actcache. dir: "" # The host of the cache server. # It's not for the address to listen, but the address to connect from job containers. # So 0.0.0.0 is a bad choice, leave it empty to detect automatically. - host: "" + host: "IP" # The port of the cache server. # 0 means to use a random available port. port: 0 @@ -99,6 +108,10 @@ container: force_pull: true # Rebuild docker image(s) even if already present force_rebuild: false + # Always require a reachable docker daemon, even if not required by act_runner + require_docker: false + # Timeout to wait for the docker daemon to be reachable, if docker is required by require_docker or act_runner + docker_timeout: 0s host: # The parent directory of a job's working directory. diff --git a/gitea-runner/docker-compose-multi.yml b/gitea-runner/docker-compose-multi.yml deleted file mode 100644 index 83580e8..0000000 --- a/gitea-runner/docker-compose-multi.yml +++ /dev/null @@ -1,42 +0,0 @@ -services: - gitea_runner1: - container_name: gitea_runner1 - image: docker.io/gitea/act_runner:0.3.0@sha256:8368754bb612a1deb07ed604e3b955338aefc01576d4d0d92e8dd82f29250fcd - restart: unless-stopped - environment: - CONFIG_FILE: /config.yml - GITEA_INSTANCE_URL: "${INSTANCE_URL}" - GITEA_RUNNER_REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}" - GITEA_RUNNER_NAME: "${RUNNER_NAME1}" - volumes: - - ./config.yml:/config.yml - - ./data1:/data - - /var/run/docker.sock:/var/run/docker.sock - - gitea_runner2: - container_name: gitea_runner2 - image: docker.io/gitea/act_runner:0.3.0@sha256:8368754bb612a1deb07ed604e3b955338aefc01576d4d0d92e8dd82f29250fcd - restart: unless-stopped - environment: - CONFIG_FILE: /config.yml - GITEA_INSTANCE_URL: "${INSTANCE_URL}" - GITEA_RUNNER_REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}" - GITEA_RUNNER_NAME: "${RUNNER_NAME2}" - volumes: - - ./config.yml:/config.yml - - ./data2:/data - - /var/run/docker.sock:/var/run/docker.sock - - gitea_runner3: - container_name: gitea_runner3 - image: docker.io/gitea/act_runner:0.3.0@sha256:8368754bb612a1deb07ed604e3b955338aefc01576d4d0d92e8dd82f29250fcd - restart: unless-stopped - environment: - CONFIG_FILE: /config.yml - GITEA_INSTANCE_URL: "${INSTANCE_URL}" - GITEA_RUNNER_REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}" - GITEA_RUNNER_NAME: "${RUNNER_NAME3}" - volumes: - - ./config.yml:/config.yml - - ./data3:/data - - /var/run/docker.sock:/var/run/docker.sock