ci(forgejo): bundle runner-and-actions infrastructure fixes #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "agent/fix-actions-resolution"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Three commits, three concerns, all in the runner / CI infrastructure
domain.
ci(forgejo): use full URLs for Forgejo Action referencesforgejo/templates/branch-policy/.forgejo/workflows/branch-policy.yml(canonical) and
.forgejo/workflows/branch-policy.yml(automation's own) to reference
https://code.forgejo.org/actions/checkout@v4andhttps://code.forgejo.org/actions/setup-node@v4instead ofbare
actions/checkout@v4/actions/setup-node@v4.in place when CI runs against this PR — i.e. no break-glass
on protection is needed.
chore(forgejo): add forgejo-runner-1 to runner label setforgejo_runner_labelsinforgejo/ansible/roles/forgejo-runner/defaults/main.ymlwith
forgejo-runner-1:docker://node:22-bookworm.runs-on: forgejo-runner-1,and Forgejo Actions matches
runs-onagainst labels (notnames). Until this commit, no runner had a
forgejo-runner-1label — jobs would queue indefinitely.
docs(forgejo): add runner-recovery runbookforgejo/docs/runner-recovery-runbook.md.registration tokens), and the API-driven recovery sequence
used on 2026-05-09. Documents the
runs-on/label contractand the Forgejo Actions resolution gotcha now fixed.
Why
Tonight the runner was offline and jobs accumulated unrunnable. The
root causes:
Stale registration token in vault. Forgejo registration tokens
are single-use; a prior register attempt consumed it, and re-runs
saw
runner registration token not found. The runbook documentsfetching a fresh token via
/api/v1/admin/runners/registration-tokenusing a temp
read:admin-scoped token, sidestepping thecopy-paste-from-UI loop.
Label/
runs-onmismatch. B3 distribution shippedruns-on: forgejo-runner-1but the role only configuredubuntu-24.04andubuntu-latestlabels. Even after registration,no runner would match. Adding
forgejo-runner-1as a label pairedwith
docker://node:22-bookwormaligns runner config with theworkflow contract.
Forgejo Actions resolution.
uses: actions/checkout@v4resolves against the local Forgejo (
git.hanumanapps.io/actions/)by default. There's no
actions/checkoutrepo there, so jobsfail in ~1s with a 404 on
git-upload-pack. Switching to full URLsat
code.forgejo.org(the official Forgejo Actions mirror)resolves correctly and matches the recommended Forgejo idiom.
How verified
(
[ubuntu-24.04 ubuntu-latest forgejo-runner-1]); daemon logconfirmed via
docker logs forgejo-runner --tail 5.code.forgejo.org/actions/checkoutandcode.forgejo.org/actions/setup-nodeexist with
v4tags — verified viaGET https://code.forgejo.org/api/v1/repos/actions/<name>/tags/v4→ 200.yamllintclean on both updated workflow files and the roledefaults.
branch-policyCI run is the live test of the action-URLfix; if it passes, the canonical template is ready for distribution
to the other 5 repos via
automation/forgejo/scripts/distribute-branch-policy.sh.Follow-up after merge
After this lands on
automation/main, the canonical template fixneeds to propagate to the other 5 repos (
machine-protocol,platform,verticals,portal-build,portal-operations). Run:Each PR opens on
agent/add-branch-policy-workflow(the script'sdefault), runs CI on its head branch (which has the fixed workflow),
and is mergeable on green. Foundation PR (#3 on
platform) re-runsits CI after
platform/mainis fixed.Refs: B3 (
platform/docs/wip/B3-git-policy.md); B3 D26 (force-pushon feature branches allowed); runner-recovery-runbook (this PR).