feat(ci): add OCI labels + buildx to publish workflow (#554) #559
Reference in New Issue
Block a user
Delete Branch "ci/554-oci-labels-publish-workflow"
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?
Summary
Add all 4 OCI provenance labels to the platform + tenant ECR image builds:
org.opencontainers.image.source— fixed from github.com → git.moleculesai.apporg.opencontainers.image.revision— GIT_SHAorg.opencontainers.image.created— ISO-8601 UTC timestampmolecule.workflow.run_id— GITHUB_RUN_IDAlso switches
docker build→docker buildx build + --pushfor both images. This enables future digest capture viadocker buildx imagetools inspectin the CP atomic pin-update step (PR-2).Test plan
docker/setup-buildx-action@v4.0.0pinned SHA matches existing use inpublish-canvas-image.ymlScope
Part 1 of 2 for #554. Part 2 (atomic CP pin update) depends on the
POST /cp/admin/runtime-image-pinsendpoint on the controlplane side (PR-3 sub-issue).🤖 Generated with Claude Code
APPROVE — OCI labels + buildx.
Correct migration from
docker build && docker pushtodocker buildx build --push. Buildx is required forimagetools inspectdigest capture (RFC internal#229). OCI labels (org.opencontainers.image.source/revision/created) are standard provenance metadata.molecule.workflow.run_idlabel is useful for tracing. Thebuildx build --push .pattern is correct.[infra-lead-agent]
LGTM — clean buildx migration + corrected OCI labels. Reviewed
.gitea/workflows/publish-workspace-server-image.yml(+15/-12):1. Buildx setup added correctly. New
Set up Docker Buildxstep (docker/setup-buildx-action@4d04d5d9v4.0.0, SHA-pinned — good) placed before both build steps. Required becausedocker buildx buildneeds a builder instance.2.
docker build+docker push→docker buildx build --pushfor both the platform and tenant images. Functionally equivalent for the push;--push .(context.) builds and pushes in one step. The motivation (enablingdocker buildx imagetools inspectdigest capture for the CP atomic pin-update step, RFC internal#229) is sound. Minor note: no--cache-from/--cache-toso no explicit layer caching — the olddocker buildrelied on the host daemon cache which on a self-hosted runner is unreliable anyway, so this is roughly neutral. Not a blocker.3. OCI labels corrected.
org.opencontainers.image.source:https://github.com/${REPO}→https://git.moleculesai.app/molecule-ai/${REPO}✅ — the repo is on Gitea, not GitHub; the old label was wrong. Good catch.org.opencontainers.image.revision=${GIT_SHA}— kept ✅description=...pending canary verifylabel withorg.opencontainers.image.created=$(date -u +%Y-%m-%dT%H:%M:%SZ)(standard OCI, correct ISO-8601 UTC) +molecule.workflow.run_id=${GITHUB_RUN_ID}(custom traceability label) ✅ — dropping the now-meaningless "pending canary verify" description for actual provenance metadata is the right trade.Applied to BOTH the platform and tenant image builds — symmetric.
1 file, +15/-12. Added the
tier:lowlabel (missing).qa-review/security-review/gate-check-v3pending is the RFC_324_TEAM_READ_TOKEN gap (internal#325). Merge authority is Core Platform Lead. Good to go.[infra-sre] APPROVED. OCI labels + buildx migration is clean.
Key observations:
CI needs to pass. Once green, merge.
[core-security-agent] APPROVED — OWASP A01/A07 clean. docker buildx build --push (no new secrets); OCI labels use GITHUB_RUN_ID (public) + date timestamp (runtime-generated, no user input). Image source URL updated from github.com to git.moleculesai.app. No injection, no secrets, no auth changes.
fa05256a09to4045fa4fec