Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: docker build .
- uses: docker/setup-buildx-action@v3
- run: docker buildx build --platform linux/amd64,linux/arm64 .
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Build both the proxy and the test mock as static binaries.
FROM golang:1.26 AS build
# Build both the proxy and the test mock as static binaries. The build stage
# runs natively on the builder and cross-compiles for the target platform, so
# multi-arch builds need no emulation.
FROM --platform=$BUILDPLATFORM golang:1.26 AS build
WORKDIR /src
COPY . .
ARG TARGETOS
ARG TARGETARCH
ARG VERSION
ARG COMMIT
ARG BUILD_DATE
Expand All @@ -25,8 +29,9 @@ RUN set -eu; \
d="${BUILD_DATE:-$(date -u +%Y-%m-%dT%H:%M:%SZ)}"; \
dirty_flag="${DIRTY:-unknown}"; \
ldflags="-s -w -X main.version=$v -X main.commit=$c -X main.buildDate=$d -X main.dirty=$dirty_flag"; \
CGO_ENABLED=0 go build -trimpath -buildvcs=false -ldflags "$ldflags" -o /out/steady-proxy .; \
CGO_ENABLED=0 go build -trimpath -buildvcs=false -o /out/testupstream ./testupstream
export CGO_ENABLED=0 GOOS="$TARGETOS" GOARCH="$TARGETARCH"; \
go build -trimpath -buildvcs=false -ldflags "$ldflags" -o /out/steady-proxy .; \
go build -trimpath -buildvcs=false -o /out/testupstream ./testupstream

# Minimal runtime; distroless/static ships CA certs (needed for upstream TLS).
FROM gcr.io/distroless/static-debian12
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ curl -fsS http://127.0.0.1:8789/__version

### Prebuilt container image

Linux `amd64` images are published to GitHub Container Registry:
Linux `amd64` and `arm64` images are published to GitHub Container Registry:

```bash
docker pull ghcr.io/xllent-ai/steady-proxy:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ All steps use GitHub's built-in `GITHUB_TOKEN`; no external secrets are required

## Container images

The [container workflow](../.github/workflows/docker-publish.yml) publishes Linux `amd64` images to `ghcr.io/xllent-ai/steady-proxy`:
The [container workflow](../.github/workflows/docker-publish.yml) publishes multi-arch Linux `amd64` and `arm64` images to `ghcr.io/xllent-ai/steady-proxy`:

- **Push to `main`:** Publishes `latest` and `sha-<full-commit-sha>`.
- **Release published:** Publishes `<release-tag>` (e.g., `v0.1.1`) and `sha-<full-commit-sha>`. Release builds never overwrite `latest`.
Expand Down
Loading