Build & push images to the Forgejo container registry #3
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
type/bug
type/chore
type/ci-cd
type/docs
type/feature
type/qa
v1.0.0
v1.1.0
v1.2.0
v2.0.0
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED#3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Goal
Publish authoritative container images to our own registry so there is always a canonical image source (and a foundation for full CD later).
Scope
linux/amd64images to the Forgejo container registry:git.rhoving.com/rbrooks/iris-wled:<tag>git.rhoving.com/rbrooks/iris-wled:latestAcceptance criteria
linux/amd64image lands in the Forgejo registrylatestand the version tag are both pushedwrite:packagetoken held as a repo Actions secret, and no credentials are embedded in the workflowDepends on: CI migration to Forgejo Actions.
This is already implemented —
.forgejo/workflows/release.yml(from the CI migration) builds and pusheslinux/amd64+linux/arm64togit.rhoving.com/rbrooks/iris-wledonv*tags viadocker/login-actionwith the built-in Actions token (secrets.GITHUB_TOKEN), tagged:{version},:{major}.{minor}, and:latest(metadata-action). No GHCR remnant (the.github/workflows were deleted; the PRci.ymlbuild ispush: false). So the code side of #3 is done.Not yet validated — it only runs at tag time, and you said the registry/token setup is uncertain. Before cutting v1.0.0 (#10), please confirm/enable:
has_packages: true, so this is likely already on).v0.0.1-rc1) first to validate the whole build→push→release flow before the realv1.0.0tag.Leaving this open until validated by a real tag run.
Build & push multi-arch images to the Forgejo container registryto Build & push images to the Forgejo container registryAudited 2026-09-01. One criterion met, one blocked, and one that the implementation now contradicts — deliberately.
linux/amd64image lands in the Forgejo registry —ci.ymlpublishes on push tomainas:mainand:sha-<short>, retagging the image the E2E ran against rather than rebuilding (#64). Verified end to end tonight: pulled onto the dev host and running there.latestand the version tag are both pushed — blocked on #4. Those tags come fromrelease.yml, which triggers onv*, and the repo has zero tags, so that path has never executed.On that third criterion
Both
ci.ymlandrelease.ymlauthenticate withsecrets.REGISTRY_TOKEN— a Forgejo token withwrite:packagescope. That is a long-lived PAT, which is what this criterion says to avoid.The reason is empirical, not preference:
secrets.GITHUB_TOKENdoes not carrywrite:packageon this instance. Login with it succeeds, and then the push fails with401 Unauthorizedfrom/v2/.../blobs/uploads/. That failure mode is nasty precisely because the login step goes green, so the job looks fine until the push. We hit it for real on #64, and it's now documented in a comment above both login steps.REGISTRY_TOKENis the same pattern the marginalia repo uses to publish to this registry.So this criterion should be amended rather than left failing, since the current state is the correct one given the instance. Suggested replacement:
Worth noting the secret is a single point of failure with no rotation story. If Forgejo later grants
write:packageto the built-in token, this should go back.Net: #3 is blocked only on #4. Nothing here needs doing except the wording fix and the tag-path proof, which belongs to #4 anyway.
All three criteria met — closing. The third was amended rather than satisfied; see the note in the body.
linux/amd64image in the registryci.ymlpublishes:mainand:sha-<short>on every push tomain(#64), retagging the exact image the E2E ran against rather than rebuilding. Verified by pulling it onto the dev host, which has been running from the registry since.latestand the version tag both pushedrelease.ymlproven end to end by the #4 dry run: av0.0.1-rc1tag produced:0.0.1-rc1, pulled and inspected —linux/amd64, 87 MB, digest distinct from:main.secrets.REGISTRY_TOKENin both workflows, exercised for real on the release path during #4.One honest caveat on the second criterion
:latestand{{major}}.{{minor}}have never actually been pushed. The #4 dry run used a pre-release tag, which suppresses both by design (#105) — deliberately, so a throwaway tag could not move:latest. They are the samedocker/build-push-actionstep with the same credentials as the version tag that was pushed, so the risk is small, but "small" is not "observed".v1.0.0will be their first real exercise, which is #10's job and a thing to actually look at when the tag lands rather than assume.Carried forward
The
REGISTRY_TOKENsecret has no rotation story and is a single point of failure for publishing. Not blocking, but worth an issue if you want it tracked — and worth revisiting if Forgejo ever grantswrite:packageto the built-in Actions token, at which point the original criterion becomes achievable again.