Skip to content

ci(release): cache Docker layers for the release-selfhost multi-arch build #2502

Description

@JSONbored

Parent: #1936

Problem

The multi-arch (linux/amd64 + linux/arm64, QEMU-emulated) docker/build-push-action step in .github/workflows/release-selfhost.yml has no cache-from/cache-to, so every Orb release build is fully cold with zero layer reuse across runs — unlike selfhost.yml's CI build, which already sets --cache-from type=gha --cache-to type=gha,mode=max.

Every tagged orb-v* release (and every workflow_dispatch run) rebuilds the entire image from scratch for both platforms, including the slow apt-get install ca-certificates and npm install -g @anthropic-ai/claude-code @openai/codex layers in runtime-base (Dockerfile) — under QEMU emulation for arm64 this is especially costly, and it can't even inherit the cache the same-commit selfhost.yml CI run just built and pushed to the GHA cache backend for the identical Dockerfile.

Fix

Add cache-from: type=gha and cache-to: type=gha,mode=max (or a registry-backed cache-from/to pointing at ghcr.io) to the docker/build-push-action step in release-selfhost.yml, so release builds reuse layers from prior releases and from selfhost.yml's own build of the same Dockerfile.

Verification

  • Confirm current build-push-action config against .github/workflows/release-selfhost.yml (line numbers may have shifted).
  • Trigger a release build and confirm layer cache hits in the build log (reduced wall-clock vs a prior cold build).
  • Confirm the arm64 QEMU-emulated leg specifically benefits (largest expected win).

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions