fix: Create config.yaml for forgejo-runner daemon
All checks were successful
sync-to-forgejo / sync (push) Successful in 9s

The runner was failing because it expected /data/config.yaml to exist.
Now creating the config file before starting the daemon.
This commit is contained in:
sync-test 2026-07-08 04:25:05 +05:30 committed by github-actions[bot]
parent 1f3a90ad99
commit 67b1911c47

View file

@ -57,7 +57,7 @@ spec:
mountPath: /etc/docker/daemon.json
subPath: daemon.json
- name: registry-cert
mountPath: /etc/docker/certs.d/registry.nxtgauge.com/ca.crt
mountPath: /etc/docker/certs.d/ci.nxtgauge.com/ca.crt
subPath: registry.crt
readOnly: true
resources:
@ -114,6 +114,19 @@ spec:
--name "$RUNNER_NAME" \
--labels "$FORGEJO_RUNNER_LABELS"
echo "Starting daemon..."
# Create config.yaml for daemon
if [ ! -f /data/config.yaml ]; then
cat > /data/config.yaml << CONFIGEOF
log:
level: info
runner:
file: .runner
daemon:
container:
network: host
privileged: true
CONFIGEOF
fi
exec forgejo-runner daemon
volumes:
- name: docker-config