acupedia-ops/docs/gitea-runner-lifecycle.md

1.5 KiB

Gitea Actions runner lifecycle

acupedia-ops owns provisioning and lifecycle management of Gitea Actions runners.

Application repositories own only their .gitea/workflows/*.yml definitions.

Inventory

Copy:

cp ansible/inventories/gitea-runners.example.yml    ansible/inventories/gitea-runners.yml

Edit the host addresses, SSH user, Gitea URL and runner labels.

Do not store the registration token in Git.

Provision

Using an environment variable:

export GITEA_RUNNER_REGISTRATION_TOKEN='...'

acupedia-ops runner provision   --inventory ansible/inventories/gitea-runners.yml

Provision only one runner:

acupedia-ops runner provision   --inventory ansible/inventories/gitea-runners.yml   --limit ci-runner-01

Force re-registration:

acupedia-ops runner provision   --inventory ansible/inventories/gitea-runners.yml   --limit ci-runner-01   --force-reregister

Remove

acupedia-ops runner remove   --inventory ansible/inventories/gitea-runners.yml   --limit ci-runner-01

Remove registration/config plus runner data:

acupedia-ops runner remove   --inventory ansible/inventories/gitea-runners.yml   --limit ci-runner-01   --remove-data

CI runner:

gitea_runner_labels:
  - "ubuntu-latest:docker://node:20-bookworm"
  - "python:docker://python:3.13-bookworm"

Deployment runner:

gitea_runner_labels:
  - "deployment:host"
  - "ansible:host"
gitea_runner_docker_enabled: false

Do not give normal CI runners production credentials.