Repository navigation
Closed
Description
Summary
Add a GitHub Actions workflow to build and push the serverless-harness container image to ghcr.io/kagenti/serverless-harness on push to main, version tags (v*), and manual dispatch. Must be multi-arch (linux/amd64,linux/arm64) using Docker Buildx, matching the pattern used in kagenti/kagenti and kagenti/kagenti-operator.
Context
Currently the image is built locally only (dev.local/serverless-harness:local) and kind-loaded for development. There is no CI automation. The Dockerfile exists at the repo root and builds @sh/knative-server — a two-stage Node.js 22 Alpine image (~667MB).
Reference Implementations
| Repo | Workflow | Registry path |
|---|---|---|
| kagenti/kagenti | .github/workflows/build.yaml |
ghcr.io/kagenti/kagenti/<image> |
| kagenti/kagenti-operator | .github/workflows/release.yml |
ghcr.io/kagenti/kagenti-operator/<image> |
Both use:
docker/setup-buildx-actiondocker/login-actionwithghcr.io+GITHUB_TOKENdocker/metadata-actionfor tag computationdocker/build-push-actionwithplatforms: linux/amd64,linux/arm64- GitHub Actions cache (
type=gha)
Tagging Strategy (match operator pattern)
| Trigger | Tags |
|---|---|
Push to main |
main-<short-sha>, latest |
Version tag v* |
semver (e.g. 1.2.3), latest |
workflow_dispatch |
latest |
Build Considerations
- Submodule checkout required —
pi-fork/is a git submodule. Useactions/checkoutwithsubmodules: recursive. - Build order — The Dockerfile already handles pi-fork build order internally (ai → agent → tui → coding-agent before pnpm workspace install). No external pre-step needed.
- Native deps on ARM — The image uses
node:22-alpinewith native canvas/cairo libs. Alpine apk packages are multi-arch, so the existing Dockerfile should work on both platforms without changes. Verify in the first CI run. - No matrix needed — Single image (
serverless-harness), unlike kagenti's multi-image matrix.
Acceptance Criteria
- Workflow file at
.github/workflows/build.yaml - Triggers: push to
main, push ofv*tags,workflow_dispatch - Builds multi-arch:
linux/amd64,linux/arm64 - Pushes to
ghcr.io/kagenti/serverless-harness - Tags follow the strategy above (sha-prefix on main, semver on tags, latest)
- Uses GitHub Actions build cache (
type=gha) - Checks out submodules recursively
- Workflow passes on current
mainbranch
Non-Goals
- Helm chart packaging (no chart in this repo yet)
- Image cleanup workflow (add later when SHA images accumulate)
- Smoke test in CI (local smoke tests are manual; add separately)
Files to Reference
Dockerfile— the existing two-stage build.dockerignore— already configuredpnpm-workspace.yaml— workspace package layoutdeploy/knative/service.yaml— shows currentdev.local/serverless-harness:localreference (will remain for local dev; CI image is for cluster deployments)
Metadata
Metadata
Assignees
Labels
No labels
Activity