feat: migrate CI to Codeberg Actions and add self-hosted runner config

- Added .forgejo/workflows/ci.yml for thin CI orchestration.
- Configured Dockerized Codeberg runner with Nix support in codeberg-runner/.
- Added systemd service for persistent runner execution.
- Added GEMINI.md for project CI/Nix conventions.
- Added Taskfile task for Linux release builds.
This commit is contained in:
Thomas Güttler
2026-05-08 12:04:42 +02:00
parent 626b7b49f9
commit b314a0c1b6
7 changed files with 113 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
# Dockerfile for a Codeberg Runner with Nix installed
FROM gitea/act_runner:latest
# Install Nix requirements and basic tools
RUN apt-get update && apt-get install -y curl xz-utils sudo && rm -rf /var/lib/apt/lists/*
# Install Nix in single-user mode (suitable for container)
# We use the Determinate Systems installer for reliability
RUN curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux \
--init none \
--no-confirm
# Add Nix to PATH
ENV PATH="/nix/var/nix/profiles/default/bin:${PATH}"
ENV NIX_PATH="nixpkgs=channel:nixos-unstable"
# Ensure the runner user can use Nix
RUN echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
+16
View File
@@ -0,0 +1,16 @@
[Unit]
Description=Codeberg CI Runner (Docker Compose)
Requires=docker.service
After=docker.service network-online.target
[Service]
Type=simple
WorkingDirectory=/home/picoclaw/projects/sharedinbox3/codeberg-runner
ExecStartPre=-/usr/bin/docker compose down
ExecStart=/usr/bin/docker compose up --build
ExecStop=/usr/bin/docker compose down
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
+19
View File
@@ -0,0 +1,19 @@
services:
runner:
build:
context: .
dockerfile: Dockerfile
restart: always
env_file:
- ../.env
environment:
- GITEA_INSTANCE_URL=${CODEBERG_INSTANCE_URL:-https://codeberg.org}
- GITEA_RUNNER_REGISTRATION_TOKEN=${CODEBERG_CI_RUNNER_TOKEN}
- GITEA_RUNNER_NAME=${CODEBERG_RUNNER_NAME:-laptop-runner}
- GITEA_RUNNER_LABELS=${CODEBERG_RUNNER_LABELS:-self-hosted,linux,nix}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./runner-data:/data
# Use host network if you want to access local services easily,
# but for most cases the default bridge is fine.
# network_mode: host