ci: push amd64 images to the in-cluster Forgejo registry #63

Merged
sirius merged 2 commits from wt/ci-in-cluster-registry into master 2026-11-17 20:10:37 +00:00

2026-11-17

tui-design
ci: log in with a write:package PAT called REGISTRY_TOKEN
Run 1364 got as far as building and naming the image, then every blob upload
401'd with 'unauthorized: reqPackageAccess'. Forgejo's container routes run
reqPackageAccess(Write), which checks the login token's own scope list for
write:package and rejects a scoped token without it — the token only has to
be scoped, since an unscoped token skips the check. The repo's FORGEJO_TOKEN
secret is such a scoped token.

FORGEJO_/GITHUB_ are reserved secret prefixes, so that name cannot be created
or updated through the API; the workflow now reads REGISTRY_TOKEN instead.
2026-11-17 15:10:13 -05:00
tui-design
ci: push amd64 images to the in-cluster Forgejo registry
The build has been red since 2026-11-14 (runs 1342+). Every failure is the
registry login step:

  Error response from daemon: Get "http://127.0.0.1:3000/v2/": dial tcp
  127.0.0.1:3000: connect: connection refused

Forgejo moved off the Pi's docker into k8s, so PUSH_REGISTRY=127.0.0.1:3000
was the job pod's own loopback. Point it at the in-cluster service
forgejo.forgejo.svc.cluster.local:3000 (whitelisted insecure on the runner).

Also:
- runs-on amd64 instead of docker: label docker only exists on the arm64 Pi
  runner, whose images the amd64 cluster cannot run.
- drop the job-level permissions block; Forgejo ignores it and flags it with a
  pre-execution warning, which was being read as the cause of the failures.
- drop the compose deploy step: it ran docker compose against the dind daemon,
  redeploying nothing. Deploys are pinned tags in homek8s apps/base/osint; the
  summary now prints the tag to pin.
- tag images amd64-<sha12> (one canonical tag, no :latest drift).
2026-11-17 15:04:00 -05:00