Files
gatehouse-api/deploy/ansible/tasks/install_project.yml
T
SangNguyen c4da5ab594
Push -> develop / Build Docker images (push) Failing after 8s
Push -> develop / Rolling deploy (push) Has been skipped
Push -> develop / Notify on result (push) Successful in 1s
ci: add gitea + runner
2026-06-23 00:26:00 +00:00

21 lines
930 B
YAML

---
# Expands one project entry into `count` runner instances.
- name: "Read registration token for {{ project_spec.project }} from env var"
ansible.builtin.set_fact:
project_token: "{{ lookup('ansible.builtin.env', project_spec.token_env) }}"
- name: "Warn and skip {{ project_spec.project }} — token missing"
ansible.builtin.debug:
msg: >-
Skipping {{ project_spec.project }}: env var {{ project_spec.token_env }} is empty/unset.
Export a fresh registration token (Gitea repo → Settings → Actions → Runners → Create new runner token).
when: project_token | length == 0
- name: "Install {{ project_spec.count }} runner(s) for {{ project_spec.project }}"
ansible.builtin.include_tasks: install_one_runner.yml
loop: "{{ range(1, project_spec.count | int + 1) | list }}"
loop_control:
loop_var: idx
label: "{{ project_spec.project }}-{{ idx }}"
when: project_token | length > 0