From 3c144f8f4d04ba58cb800e0031782b1a8b478976 Mon Sep 17 00:00:00 2001 From: Gerrit Date: Tue, 13 Oct 2026 10:46:22 +0200 Subject: [PATCH 1/2] Multiarch workflow adjustments. --- .github/workflows/build.yaml | 4 ++-- Dockerfile | 3 ++- Makefile | 2 +- README.md | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a41b68e..cc59b91 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,14 +19,14 @@ jobs: uses: metal-stack/actions-common/.github/workflows/spell-check.yaml@v1 go-build: - uses: metal-stack/actions-common/.github/workflows/go-build-multiarch.yaml@v1 + uses: metal-stack/actions-common/.github/workflows/go-build-multiarch.yaml@goarm secrets: inherit with: platforms: | [ {"platform": "linux/amd64", "goos": "linux", "goarch": "amd64", "runner": "ubuntu-latest"}, {"platform": "linux/arm64", "goos": "linux", "goarch": "arm64", "runner": "ubuntu-26.04-arm"}, - {"platform": "linux/arm/v7", "goos": "linux", "goarch": "arm", "runner": "ubuntu-26.04-arm"}, + {"platform": "linux/arm/v7", "goos": "linux", "goarch": "arm", "goarm": "7", "runner": "ubuntu-26.04-arm"}, {"build_only": true, "goos": "windows", "goarch": "amd64", "runner": "ubuntu-latest"}, {"build_only": true, "goos": "darwin", "goarch": "amd64", "runner": "ubuntu-latest"}, {"build_only": true, "goos": "darwin", "goarch": "arm64", "runner": "ubuntu-26.04-arm"} diff --git a/Dockerfile b/Dockerfile index 967c112..a84188b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ FROM alpine:3.24 ARG TARGETARCH +ARG TARGETVARIANT LABEL maintainer="metal-stack authors " -COPY --chmod=0755 metalctlv2-linux-${TARGETARCH} /metalctl +COPY --chmod=0755 bin/metalctlv2-linux-${TARGETARCH}${TARGETVARIANT:+-${TARGETVARIANT}} /metalctl ENTRYPOINT ["/metalctl"] diff --git a/Makefile b/Makefile index 5b41c4a..97ea450 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ GOOS ?= linux GOARCH ?= amd64 -BINARY := metalctlv2-$(GOOS)-$(GOARCH) +BINARY := metalctlv2-$(GOOS)-$(GOARCH)$(if $(GOARM),-v$(GOARM)) TAGS := -tags 'netgo' SHA := $(shell git rev-parse --short=8 HEAD) GITVERSION := $(shell git describe --long --all) diff --git a/README.md b/README.md index 5c9696f..fe27eaa 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Download locations: - [metalctlv2-linux-amd64](https://github.com/metal-stack/cli/releases/latest/download/metalctlv2-linux-amd64) - [metalctlv2-linux-arm64](https://github.com/metal-stack/cli/releases/latest/download/metalctlv2-linux-arm64) -- [metalctlv2-linux-arm](https://github.com/metal-stack/cli/releases/latest/download/metalctlv2-linux-arm) (32-bit ARM, armv7) +- [metalctlv2-linux-arm-v7](https://github.com/metal-stack/cli/releases/latest/download/metalctlv2-linux-arm-v7) (32-bit ARM, armv7) - [metalctlv2-darwin-amd64](https://github.com/metal-stack/cli/releases/latest/download/metalctlv2-darwin-amd64) - [metalctlv2-darwin-arm64](https://github.com/metal-stack/cli/releases/latest/download/metalctlv2-darwin-arm64) - [metalctlv2-windows-amd64](https://github.com/metal-stack/cli/releases/latest/download/metalctlv2-windows-amd64) @@ -27,7 +27,7 @@ chmod +x metalctlv2-linux-amd64 sudo mv metalctlv2-linux-amd64 /usr/local/bin/metalctlv2 ``` -Choose according to your processor architecture: For ARM systems use `metalctlv2-linux-arm64`, for ARM V7 systems (e.g. Raspberry Pi) use `metalctlv2-linux-arm` instead of `metalctlv2-linux-amd64`. +Choose according to your processor architecture: For ARM systems use `metalctlv2-linux-arm64`, for ARM V7 systems (e.g. Raspberry Pi) use `metalctlv2-linux-arm-v7` instead of `metalctlv2-linux-amd64`. ### Installation on MacOS From b2f4e6b2d7e940d17a62373712b23cb4e4d79450 Mon Sep 17 00:00:00 2001 From: Gerrit Date: Tue, 13 Oct 2026 11:13:42 +0200 Subject: [PATCH 2/2] Pin. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cc59b91..b5b9f3d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,7 +19,7 @@ jobs: uses: metal-stack/actions-common/.github/workflows/spell-check.yaml@v1 go-build: - uses: metal-stack/actions-common/.github/workflows/go-build-multiarch.yaml@goarm + uses: metal-stack/actions-common/.github/workflows/go-build-multiarch.yaml@v1 secrets: inherit with: platforms: |