From 0e19adc36c05642cc7df3fd12954e05cd159b55d Mon Sep 17 00:00:00 2001 From: dev Date: Tue, 3 Mar 2026 17:17:07 +0000 Subject: [PATCH] build: configure act_runner and simplify Docker workflow to amd64 - act_runner.compose.yml: auto-register with forge, mount Docker socket - act_runner.config.yaml: pass Docker socket to job containers, host network - docker.yml: drop QEMU/multi-arch, build linux/amd64 only (faster) Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/docker.yml | 5 +---- docker/act_runner.compose.yml | 27 ++++++++++----------------- docker/act_runner.config.yaml | 16 ++++++++++++++++ 3 files changed, 27 insertions(+), 21 deletions(-) create mode 100644 docker/act_runner.config.yaml diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml index fbf1990..0cc2134 100644 --- a/.gitea/workflows/docker.yml +++ b/.gitea/workflows/docker.yml @@ -12,9 +12,6 @@ jobs: - name: checkout uses: actions/checkout@v3 - - name: qemu - uses: docker/setup-qemu-action@v2 - - name: buildx uses: docker/setup-buildx-action@v2 @@ -30,7 +27,7 @@ jobs: with: context: . file: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64 push: true cache-from: type=gha cache-to: type=gha,mode=max diff --git a/docker/act_runner.compose.yml b/docker/act_runner.compose.yml index cd09028..235bc0f 100644 --- a/docker/act_runner.compose.yml +++ b/docker/act_runner.compose.yml @@ -1,29 +1,22 @@ version: "3" -# Gitea act_runner - to be deployed on Unraid (or any Docker host). -# Allows Gitea Actions workflows to run and build Docker images automatically. +# Gitea act_runner for Unraid +# Place this file at: /mnt/user/appdata/act_runner/docker-compose.yml +# Place act_runner.config.yaml at: /mnt/user/appdata/act_runner/config.yaml # -# Setup steps: -# 1. Copy this file to /mnt/user/appdata/act_runner/docker-compose.yml -# 2. Register the runner to get a token: -# docker run --rm -it gitea/act_runner:latest \ -# register --no-interactive \ -# --instance http://10.111.111.4:3000 \ -# --token \ -# --name unraid-runner \ -# --labels ubuntu-latest:docker://node:16-bullseye -# (get the registration token from forge.dilain.com → Settings → Actions → Runners) -# 3. Copy the generated .runner file into /mnt/user/appdata/act_runner/ -# 4. Start: docker compose up -d +# Start: docker compose up -d services: act_runner: image: gitea/act_runner:latest - container_name: act_runner + container_name: gitea-act-runner restart: unless-stopped environment: - - DOCKER_HOST=unix:///var/run/docker.sock + CONFIG_FILE: /data/config.yaml + GITEA_INSTANCE_URL: https://forge.dilain.com + GITEA_RUNNER_REGISTRATION_TOKEN: ex81a1Lror8JhaByGQ2CqppXvvO8nS7cuwqEQ7P5 + GITEA_RUNNER_NAME: unraid-runner + GITEA_RUNNER_LABELS: ubuntu-latest:docker://node:20-bullseye volumes: - /mnt/user/appdata/act_runner:/data - /var/run/docker.sock:/var/run/docker.sock - working_dir: /data diff --git a/docker/act_runner.config.yaml b/docker/act_runner.config.yaml new file mode 100644 index 0000000..adb39e5 --- /dev/null +++ b/docker/act_runner.config.yaml @@ -0,0 +1,16 @@ +runner: + capacity: 1 + timeout: 3h + insecure: false + +cache: + enabled: true + +container: + # Pass the host Docker socket into every job container so + # docker/build-push-action can build and push images. + options: -v /var/run/docker.sock:/var/run/docker.sock + # Use the host network so the job container can reach forge.dilain.com + network: host + valid_volumes: + - /var/run/docker.sock