From 5d854419e14ebb4115862276012964f3ca70d8a2 Mon Sep 17 00:00:00 2001 From: Damir Mukimov Date: Wed, 24 Dec 2025 22:58:59 +0100 Subject: [PATCH] feat: Add auto-registration for Gitea act runner in deployment.yaml - Implement a check to register the runner if the .runner file does not exist - Ensure the runner is properly configured with instance URL, token, name, and labels This enhancement streamlines the setup process for Gitea act runners. --- k8s/gitea-runners/deployment.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/k8s/gitea-runners/deployment.yaml b/k8s/gitea-runners/deployment.yaml index 0f4f534..bafc695 100644 --- a/k8s/gitea-runners/deployment.yaml +++ b/k8s/gitea-runners/deployment.yaml @@ -37,6 +37,9 @@ spec: - | apk add --no-cache nodejs npm || true cd /data + if [ ! -f .runner ]; then + /usr/local/bin/act_runner register --instance "$GITEA_INSTANCE_URL" --token "$GITEA_RUNNER_REGISTRATION_TOKEN" --name "$GITEA_RUNNER_NAME" --labels "$GITEA_RUNNER_LABELS" --no-interactive || true + fi exec /usr/local/bin/act_runner daemon env: - name: GITEA_INSTANCE_URL