From abf62856d7949365d1d114bfce175255ca7b2d91 Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Fri, 27 Jun 2025 14:11:32 +0200 Subject: [PATCH] add label for new runner --- .forgejo/workflows/ci.yaml | 14 +++---- .forgejo/workflows/update.yaml | 2 +- infra/forgejo-ci/forgejo-actions-runner.nix | 45 +++++++++++++++++++++ 3 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 infra/forgejo-ci/forgejo-actions-runner.nix diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml index c55b5918..30641f0a 100644 --- a/.forgejo/workflows/ci.yaml +++ b/.forgejo/workflows/ci.yaml @@ -10,43 +10,43 @@ on: jobs: check-pre-commit: - runs-on: icewind1991/nix-runner + runs-on: nix steps: - uses: actions/checkout@v4 - run: nix-build -A tests check-data-model: - runs-on: icewind1991/nix-runner + runs-on: nix steps: - uses: actions/checkout@v4 - run: nix-shell --run 'nix-unit ./deployment/data-model-test.nix' check-peertube: - runs-on: icewind1991/nix-runner + runs-on: nix steps: - uses: actions/checkout@v4 - run: nix-build services -A tests.peertube check-panel: - runs-on: icewind1991/nix-runner + runs-on: nix steps: - uses: actions/checkout@v4 - run: nix-build panel -A tests check-deployment-basic: - runs-on: icewind1991/nix-runner + runs-on: nix steps: - uses: actions/checkout@v4 - run: nix build .#checks.x86_64-linux.deployment-basic -L check-deployment-cli: - runs-on: icewind1991/nix-runner + runs-on: nix steps: - uses: actions/checkout@v4 - run: nix build .#checks.x86_64-linux.deployment-cli -L check-deployment-panel: - runs-on: icewind1991/nix-runner + runs-on: nix steps: - uses: actions/checkout@v4 - run: nix build .#checks.x86_64-linux.deployment-panel -L diff --git a/.forgejo/workflows/update.yaml b/.forgejo/workflows/update.yaml index 1eafce50..c206ad03 100644 --- a/.forgejo/workflows/update.yaml +++ b/.forgejo/workflows/update.yaml @@ -8,7 +8,7 @@ on: jobs: lockfile: - runs-on: icewind1991/nix-runner + runs-on: nix steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/infra/forgejo-ci/forgejo-actions-runner.nix b/infra/forgejo-ci/forgejo-actions-runner.nix new file mode 100644 index 00000000..6d483489 --- /dev/null +++ b/infra/forgejo-ci/forgejo-actions-runner.nix @@ -0,0 +1,45 @@ +{ pkgs, config, ... }: + +{ + services.gitea-actions-runner = { + package = pkgs.forgejo-actions-runner; + + instances.default = { + enable = true; + + name = config.networking.fqdn; + url = "https://git.fediversity.eu"; + tokenFile = config.age.secrets.forgejo-runner-token.path; + + settings = { + log.level = "info"; + runner = { + file = ".runner"; + capacity = 1; + timeout = "3h"; + insecure = false; + fetch_timeout = "5s"; + fetch_interval = "2s"; + }; + }; + + ## This runner supports Docker (with a default Ubuntu image) and native + ## modes. In native mode, it contains a few default packages. + labels = [ + "docker:docker://node:16-bullseye" + "nix:docker:/icewind1991/nix-runner:latest" + "native:host" + ]; + + hostPackages = with pkgs; [ + bash + git + nix + nodejs + ]; + }; + }; + + ## For the Docker mode of the runner. + virtualisation.docker.enable = true; +}