Fix Actions runner: use docker-capable job image, mount docker socket, add manual trigger
build-agent / build-and-push (push) Failing after 0s

This commit is contained in:
2026-08-23 10:53:18 +00:00
parent 8c57c48e9e
commit 0dcf5488d2
3 changed files with 12 additions and 3 deletions
+1 -2
View File
@@ -5,11 +5,10 @@ on:
paths:
- "agent/**"
- ".gitea/workflows/build.yml"
workflow_dispatch: {}
jobs:
build-and-push:
# If your act_runner advertises a different label than "docker" (check its
# config.yaml / GITEA_RUNNER_LABELS), update this to match.
runs-on: docker
steps:
- uses: actions/checkout@v4
+6
View File
@@ -0,0 +1,6 @@
# Mounts the host Docker socket into every job container act_runner creates, so
# `docker build`/`docker push` work inside workflow steps (Docker-outside-of-Docker).
# This is a runner-admin-controlled default (not something a workflow author can
# request itself), which is the safer of the two ways act_runner supports this.
container:
options: "-v /var/run/docker.sock:/var/run/docker.sock"
+5 -1
View File
@@ -84,10 +84,14 @@ services:
GITEA_INSTANCE_URL: ${GITEA_URL}
GITEA_RUNNER_REGISTRATION_TOKEN: ${ACT_RUNNER_REGISTRATION_TOKEN}
GITEA_RUNNER_NAME: gitops-vps-runner
GITEA_RUNNER_LABELS: docker:docker://node:22-bookworm
# catthehacker/ubuntu:act-latest is the standard job-container image for
# act/act_runner — includes git + docker CLI, which job steps need.
GITEA_RUNNER_LABELS: docker:docker://catthehacker/ubuntu:act-latest
CONFIG_FILE: /etc/act_runner/config.yaml
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- act_runner_data:/data
- ./act-runner-config.yaml:/etc/act_runner/config.yaml:ro
networks:
- web