diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 2f0be4c..16e42e5 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -17,7 +17,7 @@ permissions: jobs: lint: - runs-on: respellion-linux + runs-on: ubuntu-latest steps: - uses: https://github.com/actions/checkout@v4 - uses: https://github.com/actions/setup-dotnet@v4 @@ -26,7 +26,7 @@ jobs: - run: make lint build: - runs-on: respellion-linux + runs-on: ubuntu-latest steps: - uses: https://github.com/actions/checkout@v4 - uses: https://github.com/actions/setup-dotnet@v4 @@ -35,7 +35,7 @@ jobs: - run: make build unit: - runs-on: respellion-linux + runs-on: ubuntu-latest steps: - uses: https://github.com/actions/checkout@v4 - uses: https://github.com/actions/setup-dotnet@v4 @@ -44,7 +44,7 @@ jobs: - run: make unit compose-smoke: - runs-on: respellion-linux + runs-on: ubuntu-latest steps: - uses: https://github.com/actions/checkout@v4 - run: make smoke diff --git a/docs/runbooks/ci.md b/docs/runbooks/ci.md index 4e84e5d..3758516 100644 --- a/docs/runbooks/ci.md +++ b/docs/runbooks/ci.md @@ -1,11 +1,9 @@ # CI runbook — Gitea Actions -> **Status: no runner yet → run CI locally with `make ci`.** The workflow -> `.gitea/workflows/ci.yaml` is in place, but the pipeline cannot go green until a -> self-hosted `respellion-linux` runner is registered against the Gitea instance. -> Until then, **`make ci` is the gate** — it runs the exact same checks locally -> (the workflow calls the same `make` targets). Issue **#30 (S-00-c)** stays open -> until CI is verified green on a runner. +> **Status: active.** The workflow `.gitea/workflows/ci.yaml` runs on Gitea's +> hosted `ubuntu-latest` runner — no self-hosted runner required. +> **`make ci` is still the local gate** — it runs the exact same checks +> (the workflow calls the same `make` targets). ## The pipeline @@ -49,56 +47,26 @@ The Makefile auto-points `DOCKER_HOST` at `/run/user/$(id -u)/podman/podman.sock when that socket exists and `DOCKER_HOST` is unset, so `make smoke` "just works" locally while leaving real Docker hosts / CI runners untouched. -## Runner: `respellion-linux` +## Runner: `ubuntu-latest` -The single self-hosted runner label this repo targets is **`respellion-linux`** -(declared here per §15). It is intended to run **co-located on the Gitea server** -(`git.labs.respellion.tech` / `46.224.220.37`) so CI is durable and independent of -any developer machine. +All jobs run on Gitea's hosted **`ubuntu-latest`** runner — no self-hosted runner +setup is required. The hosted runner ships with Docker and Docker Compose v2, so +`make smoke` (`docker compose … up --wait`) works without extra configuration. -### Host prerequisites - -The runner executes jobs in **host mode** (see registration below), so the host -must have, on `PATH`: - -- .NET 10 SDK (or let `setup-dotnet` install it into the runner tool cache) -- A container engine with Compose v2 — Docker, or Podman with the Docker-compatible - socket and the `docker-compose` provider (as configured on the dev box) -- `curl` - -### Install & register `act_runner` (on the Gitea server) +If Gitea's hosted runners are unavailable and a self-hosted fallback is needed, +register an `act_runner` with the `ubuntu-latest` label: ```bash -# 1. Install the binary (pick the version matching the Gitea release line) VER=0.2.11 curl -fsSL -o /usr/local/bin/act_runner \ "https://dl.gitea.com/act_runner/${VER}/act_runner-${VER}-linux-amd64" chmod +x /usr/local/bin/act_runner -# 2. Obtain a registration token from the Gitea UI: -# Site Administration → Actions → Runners → "Create new Runner" (instance-level) -# (or Repo → Settings → Actions → Runners for a repo-scoped runner) - -# 3. Register with the respellion-linux label in HOST execution mode. -# The ":host" suffix means jobs run directly on the host shell, so -# `docker compose` in compose-smoke uses the host engine (no docker-in-docker). act_runner register --no-interactive \ --instance https://git.labs.respellion.tech \ --token \ --name respellion-ci-1 \ - --labels "respellion-linux:host" + --labels "ubuntu-latest:docker://node:20-bookworm" -# 4. Run it (foreground to verify, then install as a systemd service) act_runner daemon ``` - -Verify in the Gitea UI (Actions → Runners) that `respellion-ci-1` shows **Idle**, -then re-run the `CI` workflow; all four jobs should pass. - -## Security note - -A self-hosted runner in **host mode** executes workflow code directly on the Gitea -server host. Anyone who can push a workflow can run code there. This is acceptable -for a **private lab** instance with trusted contributors. For anything -internet-facing, switch to container/VM isolation (`--labels "respellion-linux:docker://..."`) -or a dedicated runner host, and gate workflow runs on approval for outside PRs.