Skip to content

draft: add image build, push, and promotion workflows#17

Draft
josh-tracey wants to merge 22 commits into
mainfrom
experiment/runkernel
Draft

draft: add image build, push, and promotion workflows#17
josh-tracey wants to merge 22 commits into
mainfrom
experiment/runkernel

Conversation

@josh-tracey

@josh-tracey josh-tracey commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Stage 1: image artifact model

Status: complete

Includes:

  • ImageArtifact
  • image report plumbing
  • empty image artifact reports

Stage 2: ci-build-push-plan

Status: complete

Includes:

  • push workflow step
  • ci-build-push-plan
  • workflow:push-plan
  • WorkflowPlan.image_push_plan
  • non-mutating image push reports

Stage 3: ci-build-push

Status: complete

Includes:

  • ci-build-push profile.
  • Manual protected image push workflow.
  • GHCR login.
  • Runtime image report accumulator.
  • Mandatory digest capture.
  • Digest-bearing ImageArtifact reports.
  • push=run plan/graph/explain support.

Stage 4: promotion plan

Status: next

Goals:

  • Build fixture image.
  • Push fixture image to GHCR/test registry.
  • Capture immutable digest.
  • Write digest-bearing ImageArtifact.
  • Upload image report artifact.
  • Keep image push manual and protected.

Remaining hardening:

  • Make digest capture mandatory.
  • Fix image-push GitHub workflow.
  • Align push task names.
  • Verify push=run plan/graph/explain.

Known limitation:

Image push is limited to a fixture service in this stage. Promotion, production deploy, signing, SBOMs, provenance, and multi-arch builds remain out of scope.

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sailr Ready Ready Preview, Comment Jul 9, 2026 6:09pm

@josh-tracey josh-tracey changed the title wip: add workflow - image build, push, and promotion draft: add image build, push, and promotion workflows Jul 8, 2026
Adds a safe, non-mutating stage for planning image pushes. Introduces the ImagePushPlan model and wiring in the WorkflowPlanner. Verifies safe step configurations for profiles.
Replace the intermediate ImagePushPlan/ImagePushPlanReport indirection
with a flat ImagePushPlanReport that owns environment, mutates_registry,
and a vec of ImagePushPlanItem (with action, image_ref fields).
- Rename WorkflowPlan.push_plan to image_push_plan (ImagePushPlanReport)
- Compute ImagePushPlanReport during planning, attach to WorkflowPlan
- Write image_push_plan into JSON report via write_workflow_report
- Add render_image_push_plan_text for CLI output
- Add ImageArtifact::from_push_plan_item helper
- Fix tests: set profile.name manually (field is #[serde(skip)])
- Use tempdir in runner report test to avoid project-dir side effects
…tion

This commit implements the first registry-mutating workflow, `ci-build-push`, proving that Sailr can safely build, push, and capture immutable image artifacts in a CI pipeline.

Key changes:
- **Profiles**: Added `ci-build-push` profile to `sailr.workflow.toml` and `default_config.toml` configured with `push=run` and `apply=true`.
- **Registry Configs**: Refactored `Environment.registry` to parse either a string or a detailed `RegistryConfig`, enabling dynamic namespace configuration instead of relying on hardcoded defaults.
- **Push Execution**: Generated `ServicePush` and `ImageReport` tasks in `planner.rs` to orchestrate `docker push`.
- **Digest Capture**: Implemented `parse_pushed_digest` for safe, regex-free substring scanning to capture immutable image digests from Docker output.
- **Workflow Accumulator**: Introduced the Sailr-owned `WorkflowReportAccumulator` to securely collect pushed `ImageArtifact` records at runtime and plumb them back into the final JSON execution report without polluting `runkernel`.
- **Safety Gates**: Enforced strict safety validations in `runner.rs`, mandating `--apply` and `approval=external` to execute `push=run`.
- **Workflows**: Added a manual `.github/workflows/image-push.yml` GitHub action to test the pipeline.

Implements Stage 3 of PR #17.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant