From b758bbb7d072d68d1ff416820b20a878c4b5993f Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Wed, 29 Jul 2026 07:29:40 +0200 Subject: [PATCH] docs: fix build references stale since the container-build rework PR #219 replaced the Dockerfile's Go builder stage with a binary-selector that copies pre-built binaries from bin/, and deleted .github/workflows/docker.yml. README and docs/development.md still pointed at that workflow and documented a local `docker build` that fails without bin/ populated. Signed-off-by: Sebastian Mendel --- README.md | 2 +- docs/development.md | 37 ++++++++++++++++++++++--------------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 3f6ad5d..62a649c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Go Reference](https://pkg.go.dev/badge/github.com/netresearch/raybeam.svg)](https://pkg.go.dev/github.com/netresearch/raybeam) [![CI Status](https://github.com/netresearch/raybeam/actions/workflows/ci.yml/badge.svg)](https://github.com/netresearch/raybeam/actions/workflows/ci.yml) -[![Docker Build](https://github.com/netresearch/raybeam/actions/workflows/docker.yml/badge.svg)](https://github.com/netresearch/raybeam/actions/workflows/docker.yml) +[![Release](https://github.com/netresearch/raybeam/actions/workflows/release.yml/badge.svg)](https://github.com/netresearch/raybeam/actions/workflows/release.yml) [![Go Version](https://img.shields.io/github/go-mod/go-version/netresearch/raybeam)](https://go.dev/dl/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Latest Release](https://img.shields.io/github/v/release/netresearch/raybeam)](https://github.com/netresearch/raybeam/releases) diff --git a/docs/development.md b/docs/development.md index ddfaa5b..b2cfb29 100644 --- a/docs/development.md +++ b/docs/development.md @@ -111,8 +111,8 @@ raybeam/ ├── README.md # Project overview ├── LICENSE # MIT license └── .github/workflows/ # GitHub Actions CI/CD - ├── docker.yml # Docker image builds - └── release.yml # Binary releases + ├── ci.yml # Lint, test, coverage + └── release.yml # Binaries + container image ``` ### Package Organization @@ -607,32 +607,39 @@ go mod tidy ### GitHub Actions Workflows -**Docker Build** (`.github/workflows/docker.yml`): -- Triggers: release publish, weekly cron, master push -- Builds multi-platform images (linux/amd64, arm64, etc.) -- Pushes to ghcr.io +**CI** (`.github/workflows/ci.yml`): +- Triggers: push to `main`, tags, pull requests, merge queue, weekly cron +- Lint, unit/integration/e2e tests, fuzzing, license check, coverage **Release** (`.github/workflows/release.yml`): -- Triggers: release publish -- Builds binaries for linux and darwin (amd64) -- Attaches to GitHub release +- Triggers: `v*` tag push, manual dispatch +- Builds binaries for linux (386, amd64, arm64, armv6, armv7), darwin (amd64, arm64) and windows (amd64) +- Builds the multi-platform container image from those binaries and pushes it to ghcr.io +- Attaches binaries, SBOMs and attestations to the GitHub release ### Local Testing -Simulate CI locally: +The Dockerfile does not compile Go. Its `binary-selector` stage copies a +pre-built binary from `bin/` and picks the one matching the target platform. +In CI the release pipeline puts the binaries there; locally you cross-compile +them yourself first: ```bash -# Build Docker image +# Build the binary for the platform the image should target +CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -o bin/raybeam-linux-amd64 . + +# Build the image docker build -t raybeam:test . # Run container docker run --rm raybeam:test raybeam --version - -# Test multi-stage build -docker build --target builder -t raybeam:builder . -docker build --target runner -t raybeam:runner . ``` +A multi-platform build needs one binary per target platform in `bin/`: the +selector maps `linux/386`, `linux/amd64`, `linux/arm64`, `linux/arm/v6` and +`linux/arm/v7` to `raybeam-linux-386`, `-amd64`, `-arm64`, `-armv6` and +`-armv7` respectively. + ## Debugging ### Logging