Fix Actions runner: use docker-capable job image, mount docker socket, add manual trigger
build-agent / build-and-push (push) Failing after 0s
build-agent / build-and-push (push) Failing after 0s
This commit is contained in:
@@ -5,11 +5,10 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- "agent/**"
|
- "agent/**"
|
||||||
- ".gitea/workflows/build.yml"
|
- ".gitea/workflows/build.yml"
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
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
|
runs-on: docker
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -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
@@ -84,10 +84,14 @@ services:
|
|||||||
GITEA_INSTANCE_URL: ${GITEA_URL}
|
GITEA_INSTANCE_URL: ${GITEA_URL}
|
||||||
GITEA_RUNNER_REGISTRATION_TOKEN: ${ACT_RUNNER_REGISTRATION_TOKEN}
|
GITEA_RUNNER_REGISTRATION_TOKEN: ${ACT_RUNNER_REGISTRATION_TOKEN}
|
||||||
GITEA_RUNNER_NAME: gitops-vps-runner
|
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:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
- act_runner_data:/data
|
- act_runner_data:/data
|
||||||
|
- ./act-runner-config.yaml:/etc/act_runner/config.yaml:ro
|
||||||
networks:
|
networks:
|
||||||
- web
|
- web
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user