diff --git a/infra/kubernetes/platform/gitea-runner/deployment.yaml b/infra/kubernetes/platform/gitea-runner/deployment.yaml index 9633abc..286bcf3 100644 --- a/infra/kubernetes/platform/gitea-runner/deployment.yaml +++ b/infra/kubernetes/platform/gitea-runner/deployment.yaml @@ -18,9 +18,21 @@ spec: containers: - name: runner image: gitea/act_runner:latest + command: + - sh + - -c + - | + if [ ! -f /data/.runner ]; then + act_runner register \ + --instance "$GITEA_INSTANCE_URL" \ + --token "$GITEA_RUNNER_REGISTRATION_TOKEN" \ + --labels "$GITEA_RUNNER_LABELS" \ + --config /config/config.yaml \ + --no-interactive + fi + exec act_runner daemon --config /config/config.yaml + workingDir: /data env: - - name: CONFIG_FILE - value: /config/config.yaml - name: GITEA_INSTANCE_URL value: http://gitea-helm-http.platform.svc:3000 - name: GITEA_RUNNER_REGISTRATION_TOKEN