1212 runs-on : ubuntu-latest
1313 strategy :
1414 matrix :
15- version : [ '7.4', ' 8.0', '8.1', '8.2', '8.3' ]
15+ version : [ '8.0', '8.1', '8.2', '8.3' ]
1616 type : [ '', '-prod' ]
1717
1818 steps :
2525 - name : Setup Docker Buildx
2626 uses : docker/setup-buildx-action@v2
2727
28- - name : Build and export to Docker
29- uses : docker/build-push-action@v3
30- with :
31- context : ${{ matrix.version }}${{ matrix.type }}
32- load : true
33- tags : kooldev/wordpress:${{ matrix.version }}${{ matrix.type }}
34-
3528 - name : Build and export to Docker (nginx)
3629 uses : docker/build-push-action@v3
3730 with :
@@ -41,18 +34,13 @@ jobs:
4134
4235 - name : Test docker images PHP executable
4336 run : |
44- docker run kooldev/wordpress:${{ matrix.version }}${{ matrix.type }} php -v
45- docker run kooldev/wordpress:${{ matrix.version }}${{ matrix.type }} wp --allow-root --version
46-
4737 docker run kooldev/wordpress:${{ matrix.version }}-nginx${{ matrix.type }} php -v
4838 docker run kooldev/wordpress:${{ matrix.version }}-nginx${{ matrix.type }} wp --allow-root --version
49-
5039 docker run kooldev/wordpress:${{ matrix.version }}-nginx${{ matrix.type }} nginx -v
5140 docker run kooldev/wordpress:${{ matrix.version }}-nginx${{ matrix.type }} supervisord version
5241
5342 - name : Test docker images wordpress code
5443 run : |
55- docker run kooldev/wordpress:${{ matrix.version }}${{ matrix.type }} php /kool/wordpress/index.php
5644 docker run kooldev/wordpress:${{ matrix.version }}-nginx${{ matrix.type }} php /kool/wordpress/index.php
5745
5846 - name : Login to DockerHub
6553 - name : Push to Hub
6654 if : github.ref == 'refs/heads/master' && github.repository == 'kool-dev/docker-wordpress'
6755 run : |
68- docker push kooldev/wordpress:${{ matrix.version }}${{ matrix.type }}
6956 docker push kooldev/wordpress:${{ matrix.version }}-nginx${{ matrix.type }}
7057
71- - name : Build and push
72- uses : docker/build-push-action@v3
73- if : github.ref == 'refs/heads/master' && github.repository == 'kool-dev/docker-wordpress'
74- with :
75- context : ${{ matrix.version }}${{ matrix.type }}
76- platforms : linux/amd64,linux/arm64
77- push : true
78- tags : kooldev/wordpress:${{ matrix.version }}${{ matrix.type }}
79-
8058 - name : Build and push (nginx)
8159 uses : docker/build-push-action@v3
8260 if : github.ref == 'refs/heads/master' && github.repository == 'kool-dev/docker-wordpress'
0 commit comments