From 68cebc0bbb7a26bbe6d03b5823325ed19ab25204 Mon Sep 17 00:00:00 2001 From: Mathias Date: Tue, 25 Aug 2026 10:54:02 +0200 Subject: [PATCH] fix(gitea-ci): hand out the call, not a copy of the build implementation (infra#309) This skill is the third factory. Two repo templates were fixed when the buildah->buildctl migration went through, and this one kept handing out the broken step for weeks afterwards -- because it is what gets consulted when adding CI to an EXISTING repo, which the templates never touch. Pasting an implementation is the actual defect. The estate now has one (mathias/infra ci-templates/build-image.sh) with byte-identical copies held in place by a drift gate, so the skill teaches the four adoption steps and the input list instead of a block to copy. Step 1 of those four -- registering in adopters.txt -- is called out explicitly, because a copy nobody registered works today and falls silently behind on the next canonical change. That is the failure this whole issue exists to end. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_011PL5XcG68SvQqz3vGVbWbf --- skills/gitea-ci/SKILL.md | 71 +++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 38 deletions(-) diff --git a/skills/gitea-ci/SKILL.md b/skills/gitea-ci/SKILL.md index 837ac16..ae5f0ac 100644 --- a/skills/gitea-ci/SKILL.md +++ b/skills/gitea-ci/SKILL.md @@ -1,6 +1,6 @@ --- name: gitea-ci -description: End-to-end Gitea CI/CD setup with self-hosted act_runner, quality gate pipeline, buildctl image build, k3s deploy, and GitHub mirror. Covers act_runner-specific gotchas that are not documented anywhere. +description: End-to-end Gitea CI/CD setup with self-hosted act_runner, quality gate pipeline, shared buildctl image-build script, k3s deploy, and GitHub mirror. Covers act_runner-specific gotchas that are not documented anywhere. --- # Gitea CI/CD Pipeline Setup @@ -133,44 +133,39 @@ jobs: echo "version-tag=${REF#refs/tags/}" >> "$GITHUB_OUTPUT" fi + # infra#309: do NOT paste a build implementation here. The estate has + # exactly one, mathias/infra's ci-templates/build-image.sh, and each + # repo carries a byte-identical copy at .gitea/build-image.sh that a + # drift gate keeps current. + # + # Copying the implementation is what made the buildah->buildctl + # migration (infra#241) an eleven-repo sprint, and what left this very + # skill handing out the broken version for weeks after the app repos + # were fixed. Per-repo differences are INPUTS, not edits to the copy. + # + # To adopt in a new repo: + # 1. add the repo to mathias/infra ci-templates/adopters.txt + # 2. run `task ci:sync` in mathias/infra -- it writes the copy + # 3. commit .gitea/build-image.sh in your repo + # 4. call it as below + # + # Skipping step 1 leaves the copy unmanaged: it works today and falls + # silently behind the next time the canonical file changes. + # + # Inputs: IMAGE (required, usually the workflow-level env), SHA_TAG, + # VERSION_TAG, GIT_SHA, IMAGE_SOURCE, BUILD_ARGS, EXTRA_LABELS, + # CONTEXT, DOCKERFILE_DIR, DOCKERFILE_NAME, PUSH_LATEST. Read the + # canonical file's header for the full list. + # + # `bash