Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

Commit dfe67a8

Browse files
committed
Build the containers on x86_64, ppc64le, s390x & aarch64 on Github
1 parent f1b04f4 commit dfe67a8

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

.github/workflows/container.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,40 @@ on:
1111

1212
jobs:
1313
podman:
14-
runs-on: ubuntu-latest
15-
name: Build the container with buildah
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
arch: ["x86_64", "arm64", "ppc64le", "s390x"]
18+
19+
runs-on: ubuntu-22.04
20+
name: Build the containers with buildah
1621
steps:
1722
- uses: actions/checkout@v3
18-
- run: buildah bud --layers .
23+
- name: update buildah
24+
run: |
25+
. /etc/os-release
26+
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_$VERSION_ID/ /" | sudo tee /etc/apt/sources.list.d/openSUSE:Tools.list
27+
curl -fsSL https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_$VERSION_ID/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/libcontainers_unstable.gpg > /dev/null
28+
sudo apt update
29+
sudo apt install buildah
30+
31+
- name: Set up QEMU
32+
uses: docker/setup-qemu-action@v2
33+
34+
- run: buildah bud --platform linux/${{ matrix.arch }} --layers .
1935

2036
docker:
2137
runs-on: ubuntu-latest
2238
name: Build and publish the container with docker
2339
steps:
2440
- uses: actions/checkout@v3
2541

42+
- name: Set up QEMU
43+
uses: docker/setup-qemu-action@v2
44+
45+
- name: Set up Docker Buildx
46+
uses: docker/setup-buildx-action@v2
47+
2648
- name: Login to GitHub Container Registry
2749
uses: docker/login-action@v2
2850
with:
@@ -34,7 +56,7 @@ jobs:
3456
uses: docker/build-push-action@v3
3557
with:
3658
context: .
37-
platforms: linux/amd64
59+
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
3860
push: ${{ contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/tags/') }}
3961
target: deploy
4062
tags: |
@@ -44,7 +66,7 @@ jobs:
4466
uses: docker/build-push-action@v3
4567
with:
4668
context: .
47-
platforms: linux/amd64
69+
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
4870
push: ${{ contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/tags/') }}
4971
target: storage-backend-deploy
5072
tags: |

0 commit comments

Comments
 (0)