From a13b60873ae1e10d01d28a2426eda654a1bb6c82 Mon Sep 17 00:00:00 2001 From: Lukas Greve Date: Sat, 19 Sep 2026 12:06:42 +0200 Subject: [PATCH] runner: migrate to gitea-runner v3.5.0, label fedora:host, name fedora-nuc, site-wide token URL --- readme.md | 8 ++++++-- roles/runner_setup.yml | 33 +++++++++++++++++---------------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/readme.md b/readme.md index 8241338..c1ae0dc 100644 --- a/readme.md +++ b/readme.md @@ -46,9 +46,13 @@ To deploy a Fedora Rawhide Cloud virtual machine, please go to [this repository] 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**: diff --git a/roles/runner_setup.yml b/roles/runner_setup.yml index e22d05e..ebf28c6 100644 --- a/roles/runner_setup.yml +++ b/roles/runner_setup.yml @@ -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 become: true vars: - gitea_runner_version: "0.2.13" - # Token has to be generated here https://git.phyllo.me/user/settings/actions/runners and paste here, like: - # registration_token: "asdlkhgalsdhlgksdahklds" + gitea_runner_version: "3.5.0" + # Token has to be generated here (site-wide scope): + # 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: "" tasks: @@ -26,16 +30,16 @@ group: "act_runner" mode: "0755" - - name: Install Act Runner + - name: Install Gitea Runner ansible.builtin.get_url: - url: "https://gitea.com/gitea/act_runner/releases/download/v{{ gitea_runner_version }}/act_runner-{{ gitea_runner_version }}-linux-amd64" - dest: "/usr/local/bin/act_runner" + url: "https://gitea.com/gitea/gitea-runner/releases/download/v{{ gitea_runner_version }}/gitea-runner-{{ gitea_runner_version }}-linux-amd64" + dest: "/usr/local/bin/gitea-runner" mode: "0755" force: "{{ (ansible_facts['cmdline']['force'] is defined) | default(false) }}" retries: 3 delay: 5 - - name: Create Act Runner configuration file + - name: Create Gitea Runner configuration file ansible.builtin.copy: content: | log: @@ -51,10 +55,7 @@ fetch_interval: 2s github_mirror: '' labels: - - "fedora-cloud-42:docker://git.phyllo.me/devops/fedora-runner-image:latest" - - "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" + - "fedora:host" cache: enabled: true @@ -93,9 +94,9 @@ - name: Register the runner with Gitea (if not already registered) 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 }} - --name fedora-bios-0 + --name fedora-nuc when: not runner_registered.stat.exists changed_when: true notify: restart act runner service @@ -105,11 +106,11 @@ content: | [Unit] Description=Gitea Actions Runner - Documentation=https://gitea.com/gitea/act_runner + Documentation=https://gitea.com/gitea/gitea-runner After=network.target [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 WorkingDirectory=/var/lib/act_runner TimeoutSec=0