Skip to content

Commit

Permalink
Add support for s390x architecture in GitHub Actions workflows. (#337)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ashokpariya0 authored Dec 5, 2024
1 parent 612426e commit 641e634
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/image-build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/image-push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/image-push-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion hack/install-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 641e634

Please sign in to comment.