stack.basicstack.de/apps/forgejo-runner
CTO Agent 2f006b6359 fix: register runner with external URL so job containers can resolve Forgejo
Docker containers launched by the runner on the host cannot resolve
forgejo.forgejo.svc.cluster.local (k8s cluster DNS is not available
from host Docker containers). Switching to https://forgejo.basicstack.de
for runner registration so GITHUB_SERVER_URL in job context uses the
externally reachable URL, fixing git fetch in actions/checkout.

Also adds detection to force re-registration if a pod starts with the
old internal-URL .runner file still present.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-18 16:10:57 +00:00
..
forgejo-runner-config.yaml fix: remove user restriction from runner containers to allow apt-get 2026-07-18 15:56:38 +00:00
forgejo-runner-deployment.yaml fix: register runner with external URL so job containers can resolve Forgejo 2026-07-18 16:10:57 +00:00
forgejo-runner-serviceaccount.yaml Add Forgejo Actions runner deployment configuration 2026-07-18 14:21:57 +00:00
forgejo-runner-token-sealed.yaml feat: add Forgejo runner registration token secret 2026-07-18 15:45:33 +00:00
README.md Add Forgejo Actions runner deployment configuration 2026-07-18 14:21:57 +00:00

Forgejo Actions Runner

This directory contains the deployment configuration for the Forgejo Actions runner.

Prerequisites

Before deploying the runner, you need to obtain a registration token from Forgejo.

Getting the Registration Token

Option 1: Via Forgejo Admin UI

  1. Log in to https://forgejo.basicstack.de as admin
  2. Navigate to Site Administration → Actions → Runners
  3. Click "Create new Runner"
  4. Copy the registration token

Option 2: Via API

export FORGEJO_TOKEN="your-api-token"
curl -X POST \
  -H "Authorization: token $FORGEJO_TOKEN" \
  https://forgejo.basicstack.de/api/v1/admin/runners/registration-token

Creating the Secret

Once you have the registration token, create a sealed secret:

# Create a temporary secret file
kubectl create secret generic forgejo-runner-token \
  --from-literal=token='YOUR_REGISTRATION_TOKEN' \
  --namespace=forgejo \
  --dry-run=client -o yaml > /tmp/runner-token-secret.yaml

# Seal it with kubeseal
kubeseal --format=yaml < /tmp/runner-token-secret.yaml > apps/forgejo-runner/forgejo-runner-token-sealed.yaml

# Clean up
rm /tmp/runner-token-secret.yaml

Deployment

The runner is deployed via Argo CD. After creating the sealed secret, apply the Argo CD application:

kubectl apply -f apps/app-forgejo-runner.yaml

Runner Configuration

The runner is configured to:

Troubleshooting

Check runner logs:

kubectl logs -n forgejo -l app=forgejo-runner -f

Check if runner is registered:

kubectl exec -n forgejo deployment/forgejo-runner -- forgejo-runner list