Commit 6fe07aa
committed
ci: publish orchestrator + agent container images to GHCR on push to main
Builds both the orchestrator image (Dockerfile.orchestrator) and the agent
runtime image (Dockerfile.runtime) on every push to main, publishes them
as public packages to ghcr.io/stainlu, and tags with both `latest` and
`sha-<commit-sha>` for rollback.
Multi-arch (linux/amd64 + linux/arm64) via QEMU + buildx, so the same
images work on Hetzner CAX11 (ARM Ampere), Lightsail medium_3_0 (Intel
x86), and any other cloud VPS we target. GHA cache (mode=max) speeds up
subsequent builds by reusing intermediate layers across runs.
Motivation: observed deploy time on Lightsail burstable disks was ~12
minutes (dominated by a 6.5-minute `npm install -g openclaw@2026.4.11`
during the agent image build). Pre-built images pulled from GHCR drop
that to ~2-3 minutes. Hetzner deploy time drops from ~4 min to ~1-2 min
for the same reason. This is how every production managed-runtime ships
images — build once in CI, pull everywhere.
Scope of the workflow (deliberately minimal, ~90 lines):
- Trigger: push to main that touches Dockerfiles, package.json, src, or
the workflow file itself. Also workflow_dispatch for manual runs.
- Matrix strategy with two entries (orchestrator, agent) so both images
build in parallel on separate runners.
- Uses docker/build-push-action@v6 with type=gha caching.
- `provenance: false` avoids SLSA attestation noise on a project that
isn't signing releases yet.
After the first successful publish:
- The two packages appear at github.com/stainlu?tab=packages
- Each must be manually flipped to Public via the package settings page
- Deploy scripts can then `docker pull` without auth
Follow-up commits will update docker-compose.yml, scripts/deploy-hetzner.sh,
and scripts/deploy-aws-lightsail.sh to pull these images instead of
building locally on the target VM.1 parent a6f6a34 commit 6fe07aa
1 file changed
Lines changed: 94 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
0 commit comments