From 6c3b0e7e8771d7bf290f5656f7c112e1cc0af093 Mon Sep 17 00:00:00 2001 From: Medya Ghazizadeh Date: Thu, 30 Apr 2026 22:18:57 +0000 Subject: [PATCH] support multi-architecture static builds and artifact publishing --- .github/workflows/build.yml | 7 +++++-- .github/workflows/publish.yml | 3 ++- packaging/static/Makefile | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6460ee7ac..c9fd54e79 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,9 @@ on: jobs: linux: runs-on: ubuntu-latest + strategy: + matrix: + arch: [amd64, s390x, arm, ppc64le] steps: - uses: actions/checkout@v3 @@ -20,13 +23,13 @@ jobs: go-version: ${{ env.GO_VERSION }} - name: Build - run: make static-linux + run: make ARCH=${{ matrix.arch }} static-linux - name: Upload if: ${{ github.event_name == 'release' }} uses: actions/upload-artifact@v4 with: - name: cri-dockerd.ubuntu + name: cri-dockerd.linux-${{ matrix.arch }} retention-days: 5 path: | packaging/static/**/**/**/*.tgz diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8347f6e56..4512bf8eb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,7 +9,8 @@ jobs: steps: - uses: actions/download-artifact@v4 with: - name: cri-dockerd.ubuntu + pattern: cri-dockerd.linux-* + merge-multiple: true - uses: actions/download-artifact@v4 with: pattern: cri-dockerd.deb-* diff --git a/packaging/static/Makefile b/packaging/static/Makefile index 2a9c99fe1..4e3e12781 100644 --- a/packaging/static/Makefile +++ b/packaging/static/Makefile @@ -51,7 +51,7 @@ static-linux: mkdir -p build/linux/cri-dockerd cd $(APP_DIR) && env CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=$(ARCH) go build -trimpath ${CRI_DOCKERD_LDFLAGS} -o cri-dockerd mv $(APP_DIR)/cri-dockerd build/linux/cri-dockerd/cri-dockerd - tar -C build/linux -c -z -f build/linux/cri-dockerd-$(VERSION).amd64.tgz cri-dockerd + tar -C build/linux -c -z -f build/linux/cri-dockerd-$(VERSION).$(ARCH).tgz cri-dockerd .PHONY: hash_files hash_files: