Skip to content

Commit 3e9c839

Browse files
committed
add s390x architecture support to image build workflows.
Signed-off-by: Ashok Pariya <[email protected]>
1 parent 6921b4c commit 3e9c839

File tree

2 files changed

+73
-4
lines changed

2 files changed

+73
-4
lines changed

.github/workflows/image-push-master.yaml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,39 @@ jobs:
9595
${{ env.IMAGE_NAME }}:latest-ppc64le
9696
file: ./Dockerfile
9797

98+
build-and-push-s390x-ib-sriov-cni:
99+
name: image Push s390x
100+
runs-on: ubuntu-24.04
101+
steps:
102+
- name: check out the repo
103+
uses: actions/checkout@v5
104+
105+
- name: set up QEMU
106+
uses: docker/setup-qemu-action@v3
107+
108+
- name: set up Docker Buildx
109+
uses: docker/setup-buildx-action@v3
110+
111+
- name: login to Docker
112+
uses: docker/login-action@v3
113+
with:
114+
registry: ghcr.io
115+
username: ${{ github.repository_owner }}
116+
password: ${{ secrets.GITHUB_TOKEN }}
117+
118+
- name: build and push ib-sriov-cni
119+
uses: docker/build-push-action@v6
120+
with:
121+
context: .
122+
push: true
123+
platforms: linux/s390x
124+
tags: |
125+
${{ env.IMAGE_NAME }}:latest-s390x
126+
file: ./Dockerfile
127+
98128
push-manifest:
99129
runs-on: ubuntu-24.04
100-
needs: [build-and-push-amd64-ib-sriov-cni,build-and-push-arm64-ib-sriov-cni,build-and-push-ppc64le-ib-sriov-cni]
130+
needs: [build-and-push-amd64-ib-sriov-cni,build-and-push-arm64-ib-sriov-cni,build-and-push-ppc64le-ib-sriov-cni,build-and-push-s390x-ib-sriov-cni]
101131
steps:
102132
- name: set up Docker Buildx
103133
uses: docker/setup-buildx-action@v3
@@ -114,4 +144,5 @@ jobs:
114144
docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:latest -t ${{ env.IMAGE_NAME }}:${{ github.sha }} \
115145
${{ env.IMAGE_NAME }}:latest-amd64 \
116146
${{ env.IMAGE_NAME }}:latest-arm64 \
117-
${{ env.IMAGE_NAME }}:latest-ppc64le
147+
${{ env.IMAGE_NAME }}:latest-ppc64le\
148+
${{ env.IMAGE_NAME }}:latest-s390x

.github/workflows/image-push-release.yaml

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,46 @@ jobs:
119119
${{ steps.docker_meta.outputs.tags }}-ppc64le
120120
file: ./Dockerfile
121121

122+
build-and-push-s390x-ib-sriov-cni:
123+
runs-on: ubuntu-24.04
124+
name: image push s390x
125+
steps:
126+
- name: check out the repo
127+
uses: actions/checkout@v5
128+
129+
- name: set up Docker Buildx
130+
uses: docker/setup-buildx-action@v3
131+
132+
- name: login to Docker
133+
uses: docker/login-action@v3
134+
with:
135+
registry: ghcr.io
136+
username: ${{ github.repository_owner }}
137+
password: ${{ secrets.GITHUB_TOKEN }}
138+
139+
- name: docker meta
140+
id: docker_meta
141+
uses: docker/metadata-action@v5
142+
with:
143+
images: ${{ env.IMAGE_NAME }}
144+
flavor: |
145+
latest=false
146+
tags: |
147+
type=ref,event=tag
148+
149+
- name: build and push ib-sriov-cni
150+
uses: docker/build-push-action@v6
151+
with:
152+
context: .
153+
push: true
154+
platforms: linux/s390x
155+
tags: |
156+
${{ steps.docker_meta.outputs.tags }}-s390x
157+
file: ./Dockerfile
158+
122159
push-manifest:
123160
runs-on: ubuntu-24.04
124-
needs: [build-and-push-amd64-ib-sriov-cni,build-and-push-arm64-ib-sriov-cni,build-and-push-ppc64le-ib-sriov-cni]
161+
needs: [build-and-push-amd64-ib-sriov-cni,build-and-push-arm64-ib-sriov-cni,build-and-push-ppc64le-ib-sriov-cni,build-and-push-s390x-ib-sriov-cni]
125162
steps:
126163
- name: set up Docker Buildx
127164
uses: docker/setup-buildx-action@v3
@@ -148,4 +185,5 @@ jobs:
148185
docker buildx imagetools create -t ${{ steps.docker_meta.outputs.tags }} \
149186
${{ steps.docker_meta.outputs.tags }}-amd64 \
150187
${{ steps.docker_meta.outputs.tags }}-arm64 \
151-
${{ steps.docker_meta.outputs.tags }}-ppc64le
188+
${{ steps.docker_meta.outputs.tags }}-ppc64le\
189+
${{ steps.docker_meta.outputs.tags }}-s390x

0 commit comments

Comments
 (0)