From ad3133d1c0da58a337cf535b480fee20a9b9d7e4 Mon Sep 17 00:00:00 2001 From: grok-reviewer-andresmgsl Date: Sat, 1 Aug 2026 21:13:46 +0000 Subject: [PATCH] fix: slim ubuntu-latest default; install shellcheck in ci.yml (#144) Option B (andres ruling): keep act-22.04 for ubuntu-latest so box-class ci tenants can hold the image; workflows supply tools the slim image lacks. Opt-in ubuntu-latest-full for operators who need GH parity. Plain converge warns when recorded labels lag the current default map. Refs #144 --- .github/workflows/ci.yml | 14 ++++++++++ changelog.d/144.md | 3 +++ commands/forgejo-runner-install.sh | 42 +++++++++++++++++++++++------- test/cli.sh | 20 ++++++++++++++ 4 files changed, 70 insertions(+), 9 deletions(-) create mode 100644 changelog.d/144.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96d98ba..7d6aa1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,21 @@ jobs: # The file list is printed so under-coverage shows up in the log, and # the comm below turns under-coverage into a failure rather than a # thing someone has to notice: every tracked `.sh` must be in the set. + # + # Install shellcheck when missing (#144). rig's default Forgejo label + # maps ubuntu-latest to catthehacker's act-22.04 (slim), which does not + # ship shellcheck; GitHub-hosted ubuntu-latest does. The conditional + # keeps each forge from paying for the other. + # + # sudo: load-bearing on GitHub (job runs as `runner` with passwordless + # sudo) and a no-op on act-22.04 (jobs run as uid 0; the image has no + # `runner` account). Do not delete it as "dead weight" — that breaks + # the GitHub half the day that image stops preinstalling shellcheck. run: | + if ! command -v shellcheck >/dev/null 2>&1; then + sudo apt-get update + sudo apt-get install -y shellcheck + fi shopt -s globstar dotglob files=(bin/* **/*.sh) printf 'shellcheck: %s\n' "${files[@]}" diff --git a/changelog.d/144.md b/changelog.d/144.md new file mode 100644 index 0000000..6afdf69 --- /dev/null +++ b/changelog.d/144.md @@ -0,0 +1,3 @@ +### Fixed + +- Forgejo runners keep the slim `act-22.04` image for `ubuntu-latest` (full is ~54.5 GB and does not fit a box-class ci tenant); `ci.yml` installs `shellcheck` when missing, and the default map offers opt-in `ubuntu-latest-full` (#144) diff --git a/commands/forgejo-runner-install.sh b/commands/forgejo-runner-install.sh index 902bff6..f768738 100755 --- a/commands/forgejo-runner-install.sh +++ b/commands/forgejo-runner-install.sh @@ -31,7 +31,17 @@ die() { printf 'rig-forgejo-runner: ERROR: %s\n' "$1" >&2; exit "${2:-1}"; } # on the box itself. No docker-in-docker: the guide this came from stacks a # privileged dind sidecar with a plaintext tcp://…:2375 daemon to isolate jobs # from a shared CI server, and inside a box that boundary is already paid for. -DEFAULT_LABELS='ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-22.04,docker:docker://node:22-bookworm' +# +# WHY act-22.04 (slim) for ubuntu-latest, not full-22.04 — measured 2026-08-01 +# against ghcr manifests (#144): +# act-22.04: ~0.55 GB compressed / ~2.2 GB on disk — no shellcheck +# full-22.04: ~18.67 GB compressed / ~54.5 GB on disk — has shellcheck 0.8.0 +# A normal box-class ci tenant cannot hold 54.5 GB (typical free space ~34 GB). +# So ubuntu-latest stays slim, and workflows must not assume GitHub-image tools +# (rig's own ci.yml installs shellcheck when missing). Operators who need the +# full tool surface opt in with runs-on: ubuntu-latest-full — that label is +# inert until matched, so boxes that never ask pay nothing. +DEFAULT_LABELS='ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-22.04,ubuntu-latest-full:docker://ghcr.io/catthehacker/ubuntu:full-22.04,docker:docker://node:22-bookworm' # fetch_and_verify_sha256