Skip to content

Commit 1062730

Browse files
committed
Build all images in one pipeline
1 parent fdd388c commit 1062730

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/test_buildx_and_publish.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,22 @@ env:
1414
jobs:
1515
Test:
1616
runs-on: ubuntu-latest
17+
matrix:
18+
phpversion: [8.0, 8.1, 8.2]
19+
osversion: [buster, bullseye]
1720
steps:
1821
- name: Checkout
1922
uses: actions/checkout@v3
2023

2124
- name: Build image
2225
run: |
23-
docker build . -t moodle-php-apache
26+
docker build ${{phpversion}}/${{osversion}} -t moodle-php-apache
2427
2528
- name: Run tests
2629
run: |
2730
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 \
31+
-v ${{phpversion}}/${{osversion}}/tests/fixtures:/var/www/html \
32+
-v ${{phpversion}}/${{osversion}}/tests/docker-entrypoint.d:/docker-entrypoint.d \
3033
moodle-php-apache
3134
docker exec test0 php /var/www/html/test.php
3235
docker exec test0 php /var/www/html/check-ini.php
@@ -93,7 +96,7 @@ jobs:
9396
- name: Build and publish to Docker Hub and Github registries
9497
uses: docker/build-push-action@v3
9598
with:
96-
context: .
99+
context: ${{phpversion}}/${{osversion}}
97100
file: Dockerfile
98101
platforms: linux/amd64,linux/arm64
99102
push: true

0 commit comments

Comments
 (0)