@@ -15,29 +15,28 @@ jobs:
1515 - uses : actions/checkout@v6
1616 - name : Lookup PHP versions
1717 run : echo "php_versions=$(make _versions)" >> "$GITHUB_ENV"
18- build :
19- name : PHP
18+ build-amd64 :
19+ name : PHP / amd64
2020 runs-on : ubuntu-24.04
2121 needs : php-versions
2222 strategy :
2323 fail-fast : false
2424 matrix :
2525 php : ${{ fromJSON(needs.php-versions.outputs.matrix) }}
26- platform : [linux/arm64, linux/amd64]
2726 steps :
2827 - uses : actions/checkout@v6
2928 - name : Set up QEMU
3029 uses : docker/setup-qemu-action@v3
3130 - name : Set up Docker Buildx
3231 id : buildx
3332 uses : docker/setup-buildx-action@v3
34- - name : Build PHP ${{ matrix.php }} (${{ matrix.platform }})
33+ - name : Build PHP ${{ matrix.php }}
3534 uses : docker/build-push-action@v6
3635 with :
3736 file : " Dockerfile"
3837 builder : ${{ steps.buildx.outputs.name }}
3938 context : .
40- platforms : ${{ matrix.platform }}
39+ platforms : linux/amd64
4140 build-args : " php=${{ matrix.php }}"
4241 cache-from : type=gha
4342 cache-to : type=gha,mode=max
@@ -49,11 +48,48 @@ jobs:
4948 org.opencontainers.image.revision=${{ github.sha }}
5049 tags : |
5150 ghcr.io/${{ github.repository }}:${{ matrix.php }}
52- load : ${{ (matrix.platform == 'linux/amd64') }}
51+ load : true
52+ - uses : e1himself/goss-installation-action@v1.3.0
53+ - name : Test PHP ${{ matrix.php }}
54+ run : |
55+ # Sleep a bit to ensure that PHP-FPM has time to start up.
56+ GOSS_SLEEP=15 dgoss run -e GOSS_VARS_INLINE='php_version: "${{ matrix.php }}"' ghcr.io/${{ github.repository }}:${{ matrix.php }}
57+ build-arm64 :
58+ name : PHP / arm64
59+ runs-on : ubuntu-24.04-arm
60+ needs : php-versions
61+ strategy :
62+ fail-fast : false
63+ matrix :
64+ php : ${{ fromJSON(needs.php-versions.outputs.matrix) }}
65+ steps :
66+ - uses : actions/checkout@v6
67+ - name : Set up QEMU
68+ uses : docker/setup-qemu-action@v3
69+ - name : Set up Docker Buildx
70+ id : buildx
71+ uses : docker/setup-buildx-action@v3
72+ - name : Build PHP ${{ matrix.php }}
73+ uses : docker/build-push-action@v6
74+ with :
75+ file : " Dockerfile"
76+ builder : ${{ steps.buildx.outputs.name }}
77+ context : .
78+ platforms : linux/arm64
79+ build-args : " php=${{ matrix.php }}"
80+ cache-from : type=gha
81+ cache-to : type=gha,mode=max
82+ labels : |
83+ org.opencontainers.image.title=PHP ${{ matrix.php }}
84+ org.opencontainers.image.description=Docker image for PHP ${{ matrix.php }} FPM
85+ org.opencontainers.image.source=https://github.com/${{ github.repository }}
86+ org.opencontainers.image.version=${{ matrix.php }}-${{ github.sha }}
87+ org.opencontainers.image.revision=${{ github.sha }}
88+ tags : |
89+ ghcr.io/${{ github.repository }}:${{ matrix.php }}
90+ load : true
5391 - uses : e1himself/goss-installation-action@v1.3.0
54- if : ${{ (matrix.platform == 'linux/amd64') }}
5592 - name : Test PHP ${{ matrix.php }}
56- if : ${{ (matrix.platform == 'linux/amd64') }}
5793 run : |
5894 # Sleep a bit to ensure that PHP-FPM has time to start up.
5995 GOSS_SLEEP=15 dgoss run -e GOSS_VARS_INLINE='php_version: "${{ matrix.php }}"' ghcr.io/${{ github.repository }}:${{ matrix.php }}
0 commit comments