Update gitea runner

This commit is contained in:
2026-02-24 19:18:50 +05:30
parent 1c660712da
commit 8136cc18aa
3 changed files with 25 additions and 52 deletions

View File

@@ -12,3 +12,5 @@ services:
- ./config.yml:/config.yml - ./config.yml:/config.yml
- ./data:/data - ./data:/data
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
ports:
- ${PORT}:${PORT}

View File

@@ -32,31 +32,40 @@ runner:
fetch_timeout: 5s fetch_timeout: 5s
# The interval for fetching the job from the Gitea instance. # The interval for fetching the job from the Gitea instance.
fetch_interval: 2s 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. # 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" # 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 . # 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 registering, it will ask for inputting labels.
# If it's empty when execute `daemon`, will use labels in `.runner` file. # If it's empty when execute `daemon`, will use labels in `.runner` file.
labels: labels:
- "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest" - "ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-24.04"
- "ubuntu-arm64:docker://docker.gitea.com/runner-images:ubuntu-latest" - "ubuntu-latest-full:docker://ghcr.io/catthehacker/ubuntu:full-24.04"
- "ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04" - "ubuntu-arm64:docker://ghcr.io/catthehacker/ubuntu:act-24.04"
- "ubuntu-cat:docker://ghcr.io/catthehacker/ubuntu:act-latest" - "ubuntu-arm64-full:docker://ghcr.io/catthehacker/ubuntu:full-24.04"
- "bookworm:docker://node:20-bookworm" - "ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:act-22.04"
- "bookworm-slim:docker://node:24-bookworm-slim" - "ubuntu-22.04-full:docker://ghcr.io/catthehacker/ubuntu:full-22.04"
- "bullseye:docker://node:20-bullseye" - "trixie:docker://node:25-trixie"
- "bullseye-slim:docker://node:20-bullseye-slim" - "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: cache:
# Enable cache server to use actions/cache. # Enable cache server to use actions/cache.
enabled: false enabled: true
# The directory to store the cache data. # The directory to store the cache data.
# If it's empty, the cache data will be stored in $HOME/.cache/actcache. # If it's empty, the cache data will be stored in $HOME/.cache/actcache.
dir: "" dir: ""
# The host of the cache server. # The host of the cache server.
# It's not for the address to listen, but the address to connect from job containers. # 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. # So 0.0.0.0 is a bad choice, leave it empty to detect automatically.
host: "" host: "IP"
# The port of the cache server. # The port of the cache server.
# 0 means to use a random available port. # 0 means to use a random available port.
port: 0 port: 0
@@ -99,6 +108,10 @@ container:
force_pull: true force_pull: true
# Rebuild docker image(s) even if already present # Rebuild docker image(s) even if already present
force_rebuild: false 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: host:
# The parent directory of a job's working directory. # The parent directory of a job's working directory.

View File

@@ -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