File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 14
14
jobs :
15
15
Test :
16
16
runs-on : ubuntu-latest
17
+ strategy :
18
+ matrix :
19
+ phpversion : [8.0, 8.1, 8.2]
20
+ osversion : [buster, bullseye]
17
21
steps :
18
22
- name : Checkout
19
23
uses : actions/checkout@v3
20
24
21
25
- name : Build image
22
26
run : |
23
- docker build . -t moodle-php-apache
27
+ docker build ${{matrix.phpversion}}/${{matrix.osversion}} -t moodle-php-apache
24
28
25
29
- name : Run tests
26
30
run : |
27
31
docker run --name test0 -d -p 8000:80 \
28
- -v $PWD /tests/fixtures:/var/www/html \
29
- -v $PWD /tests/docker-entrypoint.d:/docker-entrypoint.d \
32
+ -v ${{matrix.phpversion}}/${{matrix.osversion}} /tests/fixtures:/var/www/html \
33
+ -v ${{matrix.phpversion}}/${{matrix.osversion}} /tests/docker-entrypoint.d:/docker-entrypoint.d \
30
34
moodle-php-apache
31
35
docker exec test0 php /var/www/html/test.php
32
36
docker exec test0 php /var/www/html/check-ini.php
93
97
- name : Build and publish to Docker Hub and Github registries
94
98
uses : docker/build-push-action@v3
95
99
with :
96
- context : .
100
+ context : ${{matrix.phpversion}}/${{matrix.osversion}}
97
101
file : Dockerfile
98
102
platforms : linux/amd64,linux/arm64
99
103
push : true
You can’t perform that action at this time.
0 commit comments