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

Commit 3ac2a84

Browse files
committed
Build the containers on x86_64, ppc64le, s390x & aarch64 on Github
1 parent 993344a commit 3ac2a84

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

.github/workflows/container.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,36 @@ 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+
- run: buildah bud --platform linux/${{ matrix.arch }} --layers .
1931

2032
docker:
2133
runs-on: ubuntu-latest
2234
name: Build and publish the container with docker
2335
steps:
2436
- uses: actions/checkout@v3
2537

38+
- name: Set up QEMU
39+
uses: docker/setup-qemu-action@v2
40+
41+
- name: Set up Docker Buildx
42+
uses: docker/setup-buildx-action@v2
43+
2644
- name: Login to GitHub Container Registry
2745
uses: docker/login-action@v2
2846
with:
@@ -34,7 +52,7 @@ jobs:
3452
uses: docker/build-push-action@v3
3553
with:
3654
context: .
37-
platforms: linux/amd64
55+
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
3856
push: ${{ contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/tags/') }}
3957
target: deploy
4058
tags: |
@@ -44,7 +62,7 @@ jobs:
4462
uses: docker/build-push-action@v3
4563
with:
4664
context: .
47-
platforms: linux/amd64
65+
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
4866
push: ${{ contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/tags/') }}
4967
target: storage-backend-deploy
5068
tags: |

0 commit comments

Comments
 (0)