@@ -17,11 +17,25 @@ jobs:
17
17
- name : Checkout code
18
18
uses : actions/checkout@v3.1.0
19
19
20
- - name : Build
21
- run : |
22
- docker build \
23
- --tag kooldev/phpqa:${{ matrix.version }} \
24
- ${{ matrix.version }}
20
+ - name : Setup QEMU
21
+ uses : docker/setup-qemu-action@v2
22
+
23
+ - name : Setup Docker Buildx
24
+ uses : docker/setup-buildx-action@v2
25
+
26
+ - name : Login to DockerHub
27
+ uses : docker/login-action@v2
28
+ if : github.ref == 'refs/heads/main' && github.repository == 'kool-dev/docker-phpqa'
29
+ with :
30
+ username : ${{ secrets.DOCKER_USERNAME }}
31
+ password : ${{ secrets.DOCKER_PASSWORD }}
32
+
33
+ - name : Build and export to Docker
34
+ uses : docker/build-push-action@v3
35
+ with :
36
+ context : ${{ matrix.version }}
37
+ load : true
38
+ tags : kooldev/phpqa:${{ matrix.version }}
25
39
26
40
- name : Tests
27
41
run : |
@@ -33,14 +47,11 @@ jobs:
33
47
docker run kooldev/phpqa:${{ matrix.version }} php-cs-fixer --version
34
48
docker run kooldev/phpqa:${{ matrix.version }} local-php-security-checker -help
35
49
36
- - name : Login to DockerHub
37
- uses : docker/login- action@v2.1.0
50
+ - name : Build and push
51
+ uses : docker/build-push- action@v3
38
52
if : github.ref == 'refs/heads/main' && github.repository == 'kool-dev/docker-phpqa'
39
53
with :
40
- username : ${{ secrets.DOCKER_USERNAME }}
41
- password : ${{ secrets.DOCKER_PASSWORD }}
42
-
43
- - name : Push to DockerHub
44
- if : github.ref == 'refs/heads/main' && github.repository == 'kool-dev/docker-phpqa'
45
- run : |
46
- docker push kooldev/phpqa:${{ matrix.version }}
54
+ context : ${{ matrix.version }}
55
+ platforms : linux/amd64,linux/arm64
56
+ push : true
57
+ tags : kooldev/phpqa:${{ matrix.version }}
0 commit comments