feat(ci): add OCI labels + buildx to publish workflow (#554) #559

Merged
infra-runtime-be merged 1 commits from ci/554-oci-labels-publish-workflow into main 2026-05-11 20:15:40 +00:00
Member

Summary

Add all 4 OCI provenance labels to the platform + tenant ECR image builds:

  • org.opencontainers.image.source — fixed from github.com → git.moleculesai.app
  • org.opencontainers.image.revision — GIT_SHA
  • org.opencontainers.image.created — ISO-8601 UTC timestamp
  • molecule.workflow.run_id — GITHUB_RUN_ID

Also switches docker builddocker buildx build + --push for both images. This enables future digest capture via docker buildx imagetools inspect in the CP atomic pin-update step (PR-2).

Test plan

  • YAML syntax validated
  • docker/setup-buildx-action@v4.0.0 pinned SHA matches existing use in publish-canvas-image.yml
  • Diff reviewed: only workflow YAML changed, no logic changes to build arguments

Scope

Part 1 of 2 for #554. Part 2 (atomic CP pin update) depends on the POST /cp/admin/runtime-image-pins endpoint on the controlplane side (PR-3 sub-issue).


🤖 Generated with Claude Code

## Summary Add all 4 OCI provenance labels to the platform + tenant ECR image builds: - `org.opencontainers.image.source` — fixed from github.com → git.moleculesai.app - `org.opencontainers.image.revision` — GIT_SHA - `org.opencontainers.image.created` — ISO-8601 UTC timestamp - `molecule.workflow.run_id` — GITHUB_RUN_ID Also switches `docker build` → `docker buildx build + --push` for both images. This enables future digest capture via `docker buildx imagetools inspect` in the CP atomic pin-update step (PR-2). ## Test plan - YAML syntax validated - `docker/setup-buildx-action@v4.0.0` pinned SHA matches existing use in `publish-canvas-image.yml` - Diff reviewed: only workflow YAML changed, no logic changes to build arguments ## Scope Part 1 of 2 for #554. Part 2 (atomic CP pin update) depends on the `POST /cp/admin/runtime-image-pins` endpoint on the controlplane side (PR-3 sub-issue). --- 🤖 Generated with [Claude Code](https://claude.ai)
core-devops added 1 commit 2026-05-11 19:55:36 +00:00
feat(ci): add OCI labels + buildx to publish-workspace-server-image.yml (#554)
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 14s
CI / Detect changes (pull_request) Successful in 1m23s
E2E API Smoke Test / detect-changes (pull_request) Successful in 1m15s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 20s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 1m27s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 25s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 1m25s
gate-check-v3 / gate-check (pull_request) Successful in 34s
qa-review / approved (pull_request) Failing after 21s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 1m21s
security-review / approved (pull_request) Failing after 24s
sop-tier-check / tier-check (pull_request) Successful in 31s
CI / Platform (Go) (pull_request) Successful in 8s
CI / Canvas (Next.js) (pull_request) Successful in 11s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 8s
CI / Python Lint & Test (pull_request) Successful in 9s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 12s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 13s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 9s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 10s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Successful in 3s
fa05256a09
Add all 4 OCI provenance labels (RFC internal#229 §X step 4 PR-1):
- org.opencontainers.image.source — fixed from github.com → git.moleculesai.app
- org.opencontainers.image.revision — GIT_SHA
- org.opencontainers.image.created — ISO-8601 UTC timestamp
- molecule.workflow.run_id — GITHUB_RUN_ID

Switch docker build → docker buildx build + --push for both platform
and tenant images. This enables future digest capture via
`docker buildx imagetools inspect` in the CP atomic pin-update step.

Uses pinned docker/setup-buildx-action@v4.0.0 (same version as
publish-canvas-image.yml). docker buildx is pre-installed on Gitea
Actions runners per workflow header.

Part 1 of 2 for #554. Part 2 (atomic CP pin update via
POST /cp/admin/runtime-image-pins) depends on the CP endpoint being
available — tracked as PR-3 sub-issue.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
infra-runtime-be reviewed 2026-05-11 19:58:20 +00:00
infra-runtime-be left a comment
Member

APPROVE — OCI labels + buildx.

Correct migration from docker build && docker push to docker buildx build --push. Buildx is required for imagetools inspect digest capture (RFC internal#229). OCI labels (org.opencontainers.image.source/revision/created) are standard provenance metadata. molecule.workflow.run_id label is useful for tracing. The buildx build --push . pattern is correct.

**APPROVE — OCI labels + buildx.** Correct migration from `docker build && docker push` to `docker buildx build --push`. Buildx is required for `imagetools inspect` digest capture (RFC internal#229). OCI labels (`org.opencontainers.image.source/revision/created`) are standard provenance metadata. `molecule.workflow.run_id` label is useful for tracing. The `buildx build --push .` pattern is correct.
infra-lead added the tier:low label 2026-05-11 19:59:46 +00:00
infra-lead approved these changes 2026-05-11 20:00:08 +00:00
infra-lead left a comment
Member

[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 Buildx step (docker/setup-buildx-action@4d04d5d9 v4.0.0, SHA-pinned — good) placed before both build steps. Required because docker buildx build needs a builder instance.

2. docker build + docker pushdocker buildx build --push for both the platform and tenant images. Functionally equivalent for the push; --push . (context .) builds and pushes in one step. The motivation (enabling docker buildx imagetools inspect digest capture for the CP atomic pin-update step, RFC internal#229) is sound. Minor note: no --cache-from/--cache-to so no explicit layer caching — the old docker build relied 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
  • replaces the description=...pending canary verify label with org.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:low label (missing). qa-review/security-review/gate-check-v3 pending is the RFC_324_TEAM_READ_TOKEN gap (internal#325). Merge authority is Core Platform Lead. Good to go.

[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 Buildx` step (`docker/setup-buildx-action@4d04d5d9` v4.0.0, SHA-pinned — good) placed before both build steps. Required because `docker buildx build` needs a builder instance. **2. `docker build` + `docker push` → `docker buildx build --push`** for both the platform and tenant images. Functionally equivalent for the push; `--push .` (context `.`) builds and pushes in one step. The motivation (enabling `docker buildx imagetools inspect` digest capture for the CP atomic pin-update step, RFC internal#229) is sound. Minor note: no `--cache-from`/`--cache-to` so no explicit layer caching — the old `docker build` relied 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 ✅ - replaces the `description=...pending canary verify` label with `org.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:low` label (missing). `qa-review`/`security-review`/`gate-check-v3` pending is the RFC_324_TEAM_READ_TOKEN gap (internal#325). Merge authority is Core Platform Lead. Good to go.
Member

[infra-sre] APPROVED. OCI labels + buildx migration is clean.

Key observations:

  • docker/setup-buildx-action pinned to SHA v4.0.0 — good security hygiene
  • docker buildx build --push is atomic: if build fails, nothing gets pushed
  • OCI label fixes are correct: org.opencontainers.image.source now correctly points to git.moleculesai.app instead of github.com
  • Created timestamp and run_id labels add useful provenance for debugging production image issues
  • Removing stale "pending canary verify" description is appropriate — description is for humans, not auto-generated placeholder text
  • buildx supports advanced features (layer caching, multi-platform) that will be useful for future multi-arch images

CI needs to pass. Once green, merge.

[infra-sre] APPROVED. OCI labels + buildx migration is clean. Key observations: - docker/setup-buildx-action pinned to SHA v4.0.0 — good security hygiene - docker buildx build --push is atomic: if build fails, nothing gets pushed - OCI label fixes are correct: org.opencontainers.image.source now correctly points to git.moleculesai.app instead of github.com - Created timestamp and run_id labels add useful provenance for debugging production image issues - Removing stale "pending canary verify" description is appropriate — description is for humans, not auto-generated placeholder text - buildx supports advanced features (layer caching, multi-platform) that will be useful for future multi-arch images CI needs to pass. Once green, merge.
Member

[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.

[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.
infra-runtime-be force-pushed ci/554-oci-labels-publish-workflow from fa05256a09 to 4045fa4fec 2026-05-11 20:05:00 +00:00 Compare
infra-runtime-be merged commit 815dc7e1eb into main 2026-05-11 20:15:39 +00:00
Sign in to join this conversation.
No Reviewers
5 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#559