Files
template-go-agent/.gitea/workflows
mathias c704fed563
CD / Lint / Test / Vet (push) Successful in 7s
CD / Build & Import (push) Skipped
CD / Deploy via GitOps (push) Skipped
ci: build with buildctl instead of buildah (infra#241)
Rootless buildah in gitea-runner's hardened securityContext (capabilities:
drop [ALL], allowPrivilegeEscalation: false) cannot remap the UID/GID range
newuidmap/newgidmap need on a fresh base-image pull, and the pod has no OCI
runtime at all. buildctl talks to the host's buildkitd over a socket, so the
privileged layer extraction happens on the host and the pod's securityContext
stops being in the picture. Same pattern as mathias/infra's segment-embedder.yml
and postgres18.yml.

A template is the highest-leverage place to fix this. Every repo generated from
here inherits its CI, so a buildah-based template does not just carry the bug —
it manufactures new instances of it. A fleet inventory for infra#241 found nine
repos still invoking buildah, and two of them are the templates.

Note the failure is latent, not immediate: warm base-image layers mask it, so a
generated repo builds fine until the first genuinely cold pull. That is exactly
the situation a NEW repo is in.

Verified by running the exact command against this repo's real build context:

    buildctl --addr unix:///run/buildkit/buildkitd.sock build \
      --frontend dockerfile.v0 --local context=. --local dockerfile=. \
      --output type=oci,dest=$TAR
    -> exporting manifest sha256:5a841529... DONE, 6.8MB OCI archive

That check matters here because this repo's own CI cannot validate the change:
the build job is deliberately skipped on the raw template (2ba2698), since
__PROJECT_NAME__ is not a legal image name. The next generated repo is the first
place it runs for real.

skopeo copy replaces `buildah push` — buildctl has no registry-push equivalent —
and runs twice to preserve the :sha and :latest tags the previous version pushed.
2026-08-21 18:29:55 +02:00
..