Skip to content

Publish multi-arch (amd64 + arm64) ghcr image from release.yml #103

Description

@kwsantiago

Context

release.yml pushes a Docker image to ghcr.io/privkeyio/wisp on each tag, but the docker/build-push-action step has no platforms: line, so it only builds for the runner's architecture (linux/amd64). There is no arm64 image.

Why it matters

Downstream consumers can't use the ghcr image where both architectures are required. The wisp-startos package needs x86_64 and aarch64, so it currently builds wisp from source in its own Dockerfile (zig, -Dcpu=baseline) rather than pulling the prebuilt image. A multi-arch ghcr image would let it switch to images.dockerTag: ghcr.io/privkeyio/wisp:<tag> (pinned by digest), the way nostr-rs-relay-startos consumes a prebuilt image, dropping the zig toolchain and source clone from the package build.

Change

Build and push multi-arch in release.yml:

- name: Set up QEMU
  uses: docker/setup-qemu-action@v3
- name: Set up Buildx
  uses: docker/setup-buildx-action@v3
# ...
- name: Build and push
  uses: docker/build-push-action@v6
  with:
    context: .
    push: true
    platforms: linux/amd64,linux/arm64
    tags: ${{ steps.meta.outputs.tags }}
    labels: ${{ steps.meta.outputs.labels }}

The Dockerfile already cross-builds with -Dcpu=baseline, so the arm64 build under QEMU should work; confirm build time is acceptable (zig under emulation can be slow) or use native arm runners if available.

Follow-up (separate, in wisp-startos)

Once a multi-arch image is published, evaluate switching the wisp-startos package from the source-building Dockerfile to the prebuilt ghcr image, weighing faster package builds against the added dependency on ghcr availability vs. today's self-contained, commit-guarded source build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions