Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
- Add workflow for building and pushing Docker image to Nexus registry - Configure semantic versioning from git tags (v1.0.0 -> 1.0.0, latest) - Add self-hosted runner configuration with Alpine Linux support - Runner uses docker:27-cli image for Docker-in-Docker builds
Gitea Actions Runner
This directory contains the configuration for a self-hosted Gitea Actions runner that supports Alpine Linux and Docker builds.
Setup
1. Get a Registration Token
Get a runner registration token from one of these locations in Gitea:
- Organization runner (recommended):
https://git.bsdserver.nl/org/wbyc/settings/actions/runners - Repository runner:
https://git.bsdserver.nl/wbyc/docker-openldap/settings/actions/runners - Instance runner: Site Administration → Actions → Runners
Click "Create new Runner" to get a token.
2. Configure Environment
cp .env.example .env
# Edit .env and set GITEA_RUNNER_REGISTRATION_TOKEN
3. Start the Runner
docker compose up -d
4. Verify Registration
Check that the runner appears in Gitea under the same location where you got the token.
Configuration
Labels
The runner is configured with these labels:
| Label | Image | Use Case |
|---|---|---|
self-hosted |
alpine:3.21 |
Default for self-hosted jobs |
alpine |
alpine:3.21 |
Explicit Alpine builds |
docker |
docker:27-cli |
Docker CLI with Alpine base |
Using in Workflows
jobs:
build:
runs-on: self-hosted # Uses Alpine
steps:
- uses: actions/checkout@v4
- run: apk add --no-cache docker-cli
- run: docker build -t myimage .
Troubleshooting
View Logs
docker compose logs -f
Re-register Runner
If the runner fails to connect, delete and recreate:
docker compose down -v
docker compose up -d
Docker Socket Permissions
If you see permission errors, ensure the Docker socket is accessible:
ls -la /var/run/docker.sock
# Should show: srw-rw---- 1 root docker ...