Closed
Description
Description
I'm trying to automate the deployment of Gitea Actions runners in a Kubernetes environment, but I'm encountering an issue where tokens generated via the CLI command are not recognized by the runner.
Current Behavior
- Running
gitea actions generate-runner-token
successfully generates a token - When the act_runner tries to use this token, it fails with:
runner registration token not found
- The documentation states that registration tokens should be obtained from the web UI at
/admin/actions/runners
Expected Behavior
The CLI-generated token should work for runner registration, enabling fully automated deployments without manual web UI interaction.
Steps to Reproduce
- Deploy Gitea 1.22.3 with Actions enabled:
[actions]
ENABLED = true
DEFAULT_ACTIONS_URL = https://gitea.com
- Generate a runner token via CLI:
gitea --config /data/gitea/conf/app.ini actions generate-runner-token
- Try to register a runner with the generated token:
act_runner register --no-interactive --instance https://git.example.com --token <generated-token> --name runner-1
- Runner fails with:
runner registration token not found
Environment
- Gitea Version: 1.22.3
- act_runner Version: 0.2.11
- Deployment: Kubernetes (MicroK8s)
- OS: Ubuntu 24.04
Use Case
This is blocking automated CI/CD deployments where runners need to be provisioned without manual intervention. In Kubernetes environments, it's common to deploy all components via manifests/operators without requiring manual web UI steps.
Possible Solutions
- Make CLI-generated tokens work with runner registration
- Add an API endpoint to retrieve registration tokens (similar to Add API endpoint to get token for registering runners for repos #23761 but for instance-level runners)
- Document how to retrieve the registration token programmatically for automation scenarios
Related Issues
- Add API endpoint to get token for registering runners for repos #23761 (Added API for repo-level runner tokens, but not for instance-level)
- Gitea Actions (Act Runner) REST API #26370 (Gitea Actions REST API proposal)