File tree Expand file tree Collapse file tree 1 file changed +9
-29
lines changed Expand file tree Collapse file tree 1 file changed +9
-29
lines changed Original file line number Diff line number Diff line change 1- name : multi-arch docker build using native runners
1+ name : multi-arch docker build using qemu
22
33on :
44 push :
5- branches : " noble"
5+ branches : noble
66 workflow_dispatch :
77
88jobs :
9- build-amd64 :
10- runs-on : ubuntu-24 .04
9+ build :
10+ runs-on : ubuntu-20 .04
1111
1212 steps :
1313 - name : checkout code
1414 uses : actions/checkout@v4
15+
16+ - name : set up qemu for linux/arm64
17+ uses : docker/setup-qemu-action@v3
1518
1619 - name : install buildx
1720 id : buildx
2225 - name : login to docker hub
2326 run : echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
2427
25- - name : build amd64 image and push to docker hub
28+ - name : build multi-arch image and push to docker hub
2629 run : |
2730 docker buildx build --push \
2831 --tag rsubr/php-apache-ubuntu:noble \
2932 --tag rsubr/php-apache-ubuntu:24.04 \
30- --platform linux/amd64 .
31-
32- build-arm64 :
33- runs-on : ubuntu-24.04-arm
34-
35- steps :
36- - name : checkout code
37- uses : actions/checkout@v4
38-
39- - name : install buildx
40- id : buildx
41- uses : docker/setup-buildx-action@v3
42- with :
43- version : latest
44-
45- - name : login to docker hub
46- run : echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
47-
48- - name : build arm64 image and push to docker hub
49- run : |
50- docker buildx build --push \
51- --tag rsubr/php-apache-ubuntu:noble \
52- --tag rsubr/php-apache-ubuntu:24.04 \
53- --platform linux/arm64 .
33+ --platform linux/amd64,linux/arm64 .
You can’t perform that action at this time.
0 commit comments