Two Gitea Actions jobs were stuck pending with:
No matching online runner with label: ubuntu-latestRoot cause: the existing runner was registered as an org-scoped runner under org Poker, while the pending jobs were for org AutoCoder (AutoCoder/AutoCoder-Engine). Label matching alone is not sufficient; runner scope must also match.
In Kubernetes (namespace: gitea):
secret/gitea-act-runner-env (GITEA_RUNNER_REGISTRATION_TOKEN) with the new global token./mnt/fastdata/k8s-pvcs/gitea/act-runner/.runnerdeployment/gitea-act-runnerVerification:
action_runner table a new runner appeared with owner_id=0 (global).To avoid confusion and prevent any future use, the old runner record (the prior org-scoped runner) was revoked by soft-deleting it in SQLite:
action_runner.deleted and action_runner.updated for id=1 to the current Unix timestamp.Generated a global runner token:
kubectl -n gitea exec <gitea-pod> -- sh -c 'su -s /bin/sh git -c "gitea actions generate-runner-token"'
Patched runner secret (token value redacted):
kubectl -n gitea patch secret gitea-act-runner-env --type='json' \
-p='[{"op":"replace","path":"/data/GITEA_RUNNER_REGISTRATION_TOKEN","value":"<base64-token>"}]'
Forced runner re-registration and restarted deployment:
kubectl -n gitea exec deploy/gitea-act-runner -c runner -- sh -lc 'rm -f /data/.runner'
kubectl -n gitea rollout restart deploy/gitea-act-runner
kubectl -n gitea rollout status deploy/gitea-act-runner
Revoked (soft-deleted) the old runner record:
kubectl -n gitea exec <gitea-pod> -- sh -c 'sqlite3 /data/gitea/gitea.db \
"update action_runner set deleted=<unix_ts>, updated=<unix_ts> where id=1;"'
deleted field, but should generally be avoided unless necessary.