From b4095c58ff825519dba76219ece055763e8f09f3 Mon Sep 17 00:00:00 2001 From: Ashok Pariya Date: Wed, 4 Dec 2024 04:10:19 +0000 Subject: [PATCH] Add support for s390x architecture in GitHub Actions workflows. Updated GitHub Actions workflows to include linux/s390x in BUILD_PLATFORMS. Modified hack/install-go.sh to dynamically select the appropriate Go tarball based on the system's architecture(amd64, arm64, or others), allowing better support for multi-architecture environments. Signed-off-by: Ashok Pariya --- .github/workflows/image-build-test.yaml | 2 +- .github/workflows/image-push-main.yaml | 2 +- .github/workflows/image-push-release.yaml | 2 +- hack/install-go.sh | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/image-build-test.yaml b/.github/workflows/image-build-test.yaml index 917ce663e..dc0c97ba6 100644 --- a/.github/workflows/image-build-test.yaml +++ b/.github/workflows/image-build-test.yaml @@ -2,7 +2,7 @@ name: image-build-test on: [push, pull_request] env: - BUILD_PLATFORMS: linux/amd64,linux/arm64,linux/ppc64le + BUILD_PLATFORMS: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x jobs: build-image: diff --git a/.github/workflows/image-push-main.yaml b/.github/workflows/image-push-main.yaml index 5fe74d245..a6c9cef0a 100644 --- a/.github/workflows/image-push-main.yaml +++ b/.github/workflows/image-push-main.yaml @@ -2,7 +2,7 @@ name: "Push images on merge to main" env: IMAGE_NAME: ghcr.io/${{ github.repository }}-plugin - BUILD_PLATFORMS: linux/amd64,linux/arm64,linux/ppc64le + BUILD_PLATFORMS: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x on: push: diff --git a/.github/workflows/image-push-release.yaml b/.github/workflows/image-push-release.yaml index f45fe53b8..619b8025b 100644 --- a/.github/workflows/image-push-release.yaml +++ b/.github/workflows/image-push-release.yaml @@ -2,7 +2,7 @@ name: "Push images on release" env: IMAGE_NAME: ghcr.io/${{ github.repository }}-plugin - BUILD_PLATFORMS: linux/amd64,linux/arm64,linux/ppc64le + BUILD_PLATFORMS: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x on: push: diff --git a/hack/install-go.sh b/hack/install-go.sh index 8be7adec1..ac92526c5 100755 --- a/hack/install-go.sh +++ b/hack/install-go.sh @@ -2,7 +2,8 @@ destination=$1 version=$(curl -s https://go.dev/dl/?mode=json | jq -r ".[0].version") -tarball=$version.linux-amd64.tar.gz +arch=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') +tarball=$version.linux-$arch.tar.gz url=https://dl.google.com/go/ mkdir -p $destination