runner: migrate to gitea-runner v3.5.0, label fedora:host, name fedora-nuc, site-wide token URL
This commit is contained in:
@@ -46,9 +46,13 @@ To deploy a Fedora Rawhide Cloud virtual machine, please go to [this repository]
|
|||||||
registration_token: "your_actual_token_here"
|
registration_token: "your_actual_token_here"
|
||||||
```
|
```
|
||||||
|
|
||||||
> Obtain the token from: https://git.phyllo.me/user/settings/actions/runners
|
> Obtain the token from: https://git.phyllo.me/admin/actions/runners
|
||||||
|
> (Site Administration → Actions → Runners)
|
||||||
|
|
||||||
> For a runner to have the global scope, one needs to generate a token with a Gitea superuser
|
> **Scope gotcha**: a token from a user's Settings → Actions → Runners is
|
||||||
|
> USER-scoped — the runner registers and shows online but never picks up jobs
|
||||||
|
> from org repos (jobs stay `queued` with `runner_id: 0`). For a **site-wide**
|
||||||
|
> runner (serves every repo), mint the token in **Site Administration**.
|
||||||
|
|
||||||
4. **Run the playbooks**:
|
4. **Run the playbooks**:
|
||||||
|
|
||||||
|
|||||||
+17
-16
@@ -1,11 +1,15 @@
|
|||||||
---
|
---
|
||||||
- name: Initial one-time setup for the Act Runner, Gitea's Action runner
|
- name: Initial one-time setup for the Gitea Actions Runner
|
||||||
hosts: gitrunner
|
hosts: gitrunner
|
||||||
become: true
|
become: true
|
||||||
vars:
|
vars:
|
||||||
gitea_runner_version: "0.2.13"
|
gitea_runner_version: "3.5.0"
|
||||||
# Token has to be generated here https://git.phyllo.me/user/settings/actions/runners and paste here, like:
|
# Token has to be generated here (site-wide scope):
|
||||||
# registration_token: "asdlkhgalsdhlgksdahklds"
|
# https://git.phyllo.me/admin/actions/runners (Site Administration)
|
||||||
|
# A token minted under a user's Settings -> Actions -> Runners is
|
||||||
|
# USER-scoped: the runner registers and shows online but never picks up
|
||||||
|
# jobs from org repos (they stay `queued`, runner_id 0). Paste it here:
|
||||||
|
# registration_token: ""
|
||||||
registration_token: ""
|
registration_token: ""
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
@@ -26,16 +30,16 @@
|
|||||||
group: "act_runner"
|
group: "act_runner"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
|
||||||
- name: Install Act Runner
|
- name: Install Gitea Runner
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: "https://gitea.com/gitea/act_runner/releases/download/v{{ gitea_runner_version }}/act_runner-{{ gitea_runner_version }}-linux-amd64"
|
url: "https://gitea.com/gitea/gitea-runner/releases/download/v{{ gitea_runner_version }}/gitea-runner-{{ gitea_runner_version }}-linux-amd64"
|
||||||
dest: "/usr/local/bin/act_runner"
|
dest: "/usr/local/bin/gitea-runner"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
force: "{{ (ansible_facts['cmdline']['force'] is defined) | default(false) }}"
|
force: "{{ (ansible_facts['cmdline']['force'] is defined) | default(false) }}"
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 5
|
delay: 5
|
||||||
|
|
||||||
- name: Create Act Runner configuration file
|
- name: Create Gitea Runner configuration file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: |
|
content: |
|
||||||
log:
|
log:
|
||||||
@@ -51,10 +55,7 @@
|
|||||||
fetch_interval: 2s
|
fetch_interval: 2s
|
||||||
github_mirror: ''
|
github_mirror: ''
|
||||||
labels:
|
labels:
|
||||||
- "fedora-cloud-42:docker://git.phyllo.me/devops/fedora-runner-image:latest"
|
- "fedora:host"
|
||||||
- "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest"
|
|
||||||
- "ubuntu-latest-full:docker://docker.gitea.com/runner-images:ubuntu-latest-full"
|
|
||||||
- "fedora-cloud-42:host"
|
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -93,9 +94,9 @@
|
|||||||
|
|
||||||
- name: Register the runner with Gitea (if not already registered)
|
- name: Register the runner with Gitea (if not already registered)
|
||||||
ansible.builtin.command: >
|
ansible.builtin.command: >
|
||||||
/usr/local/bin/act_runner register --no-interactive
|
/usr/local/bin/gitea-runner register --no-interactive
|
||||||
--config /etc/act_runner/config.yaml --instance https://git.phyllo.me --token {{ registration_token }}
|
--config /etc/act_runner/config.yaml --instance https://git.phyllo.me --token {{ registration_token }}
|
||||||
--name fedora-bios-0
|
--name fedora-nuc
|
||||||
when: not runner_registered.stat.exists
|
when: not runner_registered.stat.exists
|
||||||
changed_when: true
|
changed_when: true
|
||||||
notify: restart act runner service
|
notify: restart act runner service
|
||||||
@@ -105,11 +106,11 @@
|
|||||||
content: |
|
content: |
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Gitea Actions Runner
|
Description=Gitea Actions Runner
|
||||||
Documentation=https://gitea.com/gitea/act_runner
|
Documentation=https://gitea.com/gitea/gitea-runner
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/local/bin/act_runner daemon --config /etc/act_runner/config.yaml
|
ExecStart=/usr/local/bin/gitea-runner daemon --config /etc/act_runner/config.yaml
|
||||||
ExecReload=/bin/kill -s HUP $MAINPID
|
ExecReload=/bin/kill -s HUP $MAINPID
|
||||||
WorkingDirectory=/var/lib/act_runner
|
WorkingDirectory=/var/lib/act_runner
|
||||||
TimeoutSec=0
|
TimeoutSec=0
|
||||||
|
|||||||
Reference in New Issue
Block a user