@@ -38,34 +38,27 @@ concurrency:
3838 cancel-in-progress : true
3939
4040jobs :
41- build-x86_64 :
42- runs-on : ubuntu-24.04
43- steps :
44- - name : Checkout repo
45- uses : actions/checkout@v5
46-
47- - name : Build container image
48- uses : redhat-actions/buildah-build@v2
49- with :
50- context : .github
51- image : ${{ env.NAME }}
52- tags : latest-x86_64
53- containerfiles : Containerfile
54- oci : true
55-
56- - name : Push to Container Registry
57- uses : redhat-actions/push-to-registry@v2
58- id : push
59- if : (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'
60- with :
61- registry : ${{ env.REGISTRY }}
62- username : ${{ github.actor }}
63- password : ${{ secrets.GITHUB_TOKEN }}
64- image : ${{ env.NAME }}
65- tags : latest-x86_64
66-
67- build-aarch64 :
68- runs-on : ubuntu-24.04-arm
41+ build :
42+ runs-on : ${{ matrix.runner }}
43+ strategy :
44+ matrix :
45+ include :
46+ - tag : fedora
47+ base : quay.io/fedora/fedora:latest
48+ arch : x86_64
49+ runner : ubuntu-24.04
50+ - tag : fedora
51+ base : quay.io/fedora/fedora:latest
52+ arch : aarch64
53+ runner : ubuntu-24.04-arm
54+ - tag : centos-stream
55+ base : quay.io/centos/centos:stream9
56+ arch : x86_64
57+ runner : ubuntu-24.04
58+ - tag : centos-stream
59+ base : quay.io/centos/centos:stream9
60+ arch : aarch64
61+ runner : ubuntu-24.04-arm
6962 steps :
7063 - name : Checkout repo
7164 uses : actions/checkout@v5
7568 with :
7669 context : .github
7770 image : ${{ env.NAME }}
78- tags : latest-aarch64
71+ tags : ${{ matrix.tag }}-${{ matrix.arch }}
7972 containerfiles : Containerfile
8073 oci : true
74+ build-args : |
75+ BASE=${{ matrix.base }}
8176
8277 - name : Push to Container Registry
8378 uses : redhat-actions/push-to-registry@v2
@@ -88,22 +83,24 @@ jobs:
8883 username : ${{ github.actor }}
8984 password : ${{ secrets.GITHUB_TOKEN }}
9085 image : ${{ env.NAME }}
91- tags : latest-aarch64
86+ tags : ${{ matrix.tag }}-${{ matrix.arch }}
9287
9388 merge :
9489 runs-on : ubuntu-24.04
9590 needs :
96- - build-x86_64
97- - build-aarch64
91+ - build
92+ strategy :
93+ matrix :
94+ tag : [fedora, centos-stream]
9895 steps :
9996 - name : Create multi-arch manifest
10097 if : (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'
10198 shell : bash
10299 run : |
103100 set -euxo pipefail
104- buildah manifest create "${REGISTRY}/${NAME}:latest " \
105- "${REGISTRY}/${NAME}:latest -x86_64" \
106- "${REGISTRY}/${NAME}:latest -aarch64"
101+ buildah manifest create "${REGISTRY}/${NAME}:${{ matrix.tag }} " \
102+ "${REGISTRY}/${NAME}:${{ matrix.tag }} -x86_64" \
103+ "${REGISTRY}/${NAME}:${{ matrix.tag }} -aarch64"
107104
108105 - name : Push to Container Registry
109106 uses : redhat-actions/push-to-registry@v2
@@ -114,4 +111,4 @@ jobs:
114111 username : ${{ github.actor }}
115112 password : ${{ secrets.GITHUB_TOKEN }}
116113 image : ${{ env.NAME }}
117- tags : latest
114+ tags : ${{ matrix.tag }}
0 commit comments