@@ -69,47 +69,29 @@ jobs:
6969 cache-from : type=gha
7070 cache-to : type=gha,mode=max
7171
72- build-arm64-el8 :
73- runs-on : ubuntu-latest
74- permissions :
75- contents : read
76- packages : write
77- steps :
78- - name : Checkout repository
79- uses : actions/checkout@v4
80-
81- - name : Set up QEMU
82- uses : docker/setup-qemu-action@v3
83-
84- - name : Set up Docker Buildx
85- uses : docker/setup-buildx-action@v3
86-
87- - name : Log in to Container Registry
88- uses : docker/login-action@v3
89- with :
90- registry : ${{ env.REGISTRY }}
91- username : ${{ github.actor }}
92- password : ${{ secrets.GITHUB_TOKEN }}
93-
94- - name : Build and push ARM64 EL8
95- uses : docker/build-push-action@v5
96- with :
97- context : .
98- platforms : linux/arm64
99- file : ./docker/Dockerfile.centos-stream
100- build-args : |
101- VERSION_NUM=8
102- CHINA_MIRROR=0
103- push : true
104- tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:aarch64_el8
105- cache-from : type=gha
106- cache-to : type=gha,mode=max
107-
108- build-arm64-el9 :
72+ build-arm64 :
10973 runs-on : ubuntu-latest
11074 permissions :
11175 contents : read
11276 packages : write
77+ strategy :
78+ matrix :
79+ include :
80+ - tag_suffix : aarch64_el7
81+ dockerfile : ./docker/Dockerfile.centos
82+ build_args : |
83+ VERSION_NUM=7
84+ CHINA_MIRROR=0
85+ - tag_suffix : aarch64_el8
86+ dockerfile : ./docker/Dockerfile.centos-stream
87+ build_args : |
88+ VERSION_NUM=8
89+ CHINA_MIRROR=0
90+ - tag_suffix : aarch64_el9
91+ dockerfile : ./docker/Dockerfile.centos-stream
92+ build_args : |
93+ VERSION_NUM=9
94+ CHINA_MIRROR=0
11395 steps :
11496 - name : Checkout repository
11597 uses : actions/checkout@v4
@@ -127,16 +109,14 @@ jobs:
127109 username : ${{ github.actor }}
128110 password : ${{ secrets.GITHUB_TOKEN }}
129111
130- - name : Build and push ARM64 EL9
112+ - name : Build and push ${{ matrix.tag_suffix }}
131113 uses : docker/build-push-action@v5
132114 with :
133115 context : .
134116 platforms : linux/arm64
135- file : ./docker/Dockerfile.centos-stream
136- build-args : |
137- VERSION_NUM=9
138- CHINA_MIRROR=0
117+ file : ${{ matrix.dockerfile }}
118+ build-args : ${{ matrix.build_args }}
139119 push : true
140- tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:aarch64_el9
120+ tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.tag_suffix }}
141121 cache-from : type=gha
142122 cache-to : type=gha,mode=max
0 commit comments