build: configure act_runner and simplify Docker workflow to amd64
Some checks failed
Docker / docker (push) Failing after 35s
Some checks failed
Docker / docker (push) Failing after 35s
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -12,9 +12,6 @@ jobs:
|
|||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: qemu
|
|
||||||
uses: docker/setup-qemu-action@v2
|
|
||||||
|
|
||||||
- name: buildx
|
- name: buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
@@ -30,7 +27,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./docker/Dockerfile
|
file: ./docker/Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
|||||||
@@ -1,29 +1,22 @@
|
|||||||
version: "3"
|
version: "3"
|
||||||
|
|
||||||
# Gitea act_runner - to be deployed on Unraid (or any Docker host).
|
# Gitea act_runner for Unraid
|
||||||
# Allows Gitea Actions workflows to run and build Docker images automatically.
|
# 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:
|
# Start: docker compose up -d
|
||||||
# 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 <REGISTRATION_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
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
act_runner:
|
act_runner:
|
||||||
image: gitea/act_runner:latest
|
image: gitea/act_runner:latest
|
||||||
container_name: act_runner
|
container_name: gitea-act-runner
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
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:
|
volumes:
|
||||||
- /mnt/user/appdata/act_runner:/data
|
- /mnt/user/appdata/act_runner:/data
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
working_dir: /data
|
|
||||||
|
|||||||
16
docker/act_runner.config.yaml
Normal file
16
docker/act_runner.config.yaml
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user