Skip to content

Commit

Permalink
Build all images in one pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Mar 18, 2023
1 parent fdd388c commit 1062730
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/test_buildx_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,22 @@ env:
jobs:
Test:
runs-on: ubuntu-latest
matrix:
phpversion: [8.0, 8.1, 8.2]
osversion: [buster, bullseye]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build image
run: |
docker build . -t moodle-php-apache
docker build ${{phpversion}}/${{osversion}} -t moodle-php-apache
- name: Run tests
run: |
docker run --name test0 -d -p 8000:80 \
-v $PWD/tests/fixtures:/var/www/html \
-v $PWD/tests/docker-entrypoint.d:/docker-entrypoint.d \
-v ${{phpversion}}/${{osversion}}/tests/fixtures:/var/www/html \
-v ${{phpversion}}/${{osversion}}/tests/docker-entrypoint.d:/docker-entrypoint.d \
moodle-php-apache
docker exec test0 php /var/www/html/test.php
docker exec test0 php /var/www/html/check-ini.php
Expand Down Expand Up @@ -93,7 +96,7 @@ jobs:
- name: Build and publish to Docker Hub and Github registries
uses: docker/build-push-action@v3
with:
context: .
context: ${{phpversion}}/${{osversion}}
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
Expand Down

0 comments on commit 1062730

Please sign in to comment.