- .gitignore: ignore **/.env and **/app.env so runtime workload env files do not fail appctl clean-tree checks - github_runner/Dockerfile & entrypoint-nix.sh: extend pinned myoung34/github-runner:ubuntu-noble with nixos/nix:2.24.12 seed, /etc/nix/nix.conf, non-root runner ownership, and single-line APP_PRIVATE_KEY_B64 decoding - github_runner/docker-compose.yml: configure EPHEMERAL=true, RUN_AS_ROOT=false, DISABLE_AUTO_UPDATE=true, RUNNER_WORKDIR=/data/work, ../../var/lib/homelab/github_runner:/data, nix-store:/nix, and omit proxy-net for network isolation - github_runner/app.yaml, .env-example, README.md & deployments.yaml: register github_runner (alias gh-runner) in admission registry and document GitHub App org permissions
26 lines
877 B
YAML
26 lines
877 B
YAML
services:
|
|
github_runner:
|
|
build: .
|
|
image: ${RUNNER_IMAGE:-github-runner:local}
|
|
container_name: ${CONTAINER_NAME:-github_runner}
|
|
restart: unless-stopped
|
|
environment:
|
|
- EPHEMERAL=${EPHEMERAL:-true}
|
|
- RUN_AS_ROOT=false
|
|
- DISABLE_AUTO_UPDATE=${DISABLE_AUTO_UPDATE:-true}
|
|
- RUNNER_WORKDIR=/data/work
|
|
- RUNNER_NAME=${GITHUB_RUNNER_NAME:-homelab-github-runner}
|
|
- RUNNER_SCOPE=${GITHUB_RUNNER_SCOPE:-org}
|
|
- ORG_NAME=${GITHUB_RUNNER_ORG_NAME:-}
|
|
- REPO_URL=${GITHUB_RUNNER_REPO_URL:-}
|
|
- APP_ID=${GITHUB_RUNNER_APP_ID:-}
|
|
- APP_LOGIN=${GITHUB_RUNNER_APP_LOGIN:-}
|
|
- APP_PRIVATE_KEY_B64=${GITHUB_RUNNER_APP_PRIVATE_KEY_B64:-}
|
|
- LABELS=${GITHUB_RUNNER_LABELS:-self-hosted,linux,x64,nix}
|
|
volumes:
|
|
- ../../var/lib/homelab/github_runner:/data
|
|
- nix-store:/nix
|
|
|
|
volumes:
|
|
nix-store: {}
|