chore: replace qemu-user-static with tonistiigi/binfmt action #12
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test PHP 8 images | |
| on: | |
| schedule: | |
| # chosen by fair dice roll | |
| - cron: '42 18 * * 3' | |
| push: | |
| branches: [main] | |
| pull_request: | |
| types: [opened, synchronize] | |
| jobs: | |
| test-8: | |
| name: Build and test PHP 8 images | |
| runs-on: ubuntu-22.04 | |
| if: ${{ !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }} | |
| strategy: | |
| matrix: | |
| version: [ '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] | |
| flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ] | |
| include: | |
| - version: 'latest' | |
| flavor: '' | |
| - version: 'alpine' | |
| flavor: '' | |
| services: | |
| registry: | |
| image: registry:2 | |
| ports: | |
| - 5000:5000 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver-opts: network=host | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build image for testing | |
| uses: docker/build-push-action@v5 | |
| with: | |
| cache-from: type=registry,ref=ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }} | |
| cache-to: type=inline | |
| context: . | |
| file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }} | |
| build-args: | | |
| BASE_IMAGE=ghcr.io/chialab/php-mirror:${{ matrix.version }}${{ matrix.flavor }} | |
| tags: localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }} | |
| push: true | |
| - name: Test image | |
| env: | |
| REGISTRY: localhost:5000/ | |
| VERSION: ${{ matrix.version }}${{ matrix.flavor }} | |
| run: 'docker pull localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }} && make test' | |
| - name: Build dev image for testing | |
| uses: docker/build-push-action@v5 | |
| with: | |
| cache-to: type=inline | |
| context: ./dev | |
| build-args: | | |
| BASE_IMAGE=localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }} | |
| tags: localhost:5000/chialab/php-dev:${{ matrix.version }}${{ matrix.flavor }} | |
| push: true | |
| - name: Test dev image | |
| env: | |
| REGISTRY: localhost:5000/ | |
| VERSION: ${{ matrix.version }}${{ matrix.flavor }} | |
| run: 'docker pull localhost:5000/chialab/php-dev:${{ matrix.version }}${{ matrix.flavor }} && make -C dev test' | |
| - name: Build PCOV image for testing | |
| uses: docker/build-push-action@v5 | |
| with: | |
| cache-to: type=inline | |
| context: ./pcov | |
| build-args: | | |
| BASE_IMAGE=localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }} | |
| tags: localhost:5000/chialab/php-pcov:${{ matrix.version }}${{ matrix.flavor }} | |
| push: true | |
| - name: Test PCOV image | |
| env: | |
| REGISTRY: localhost:5000/ | |
| VERSION: ${{ matrix.version }}${{ matrix.flavor }} | |
| run: 'docker pull localhost:5000/chialab/php-pcov:${{ matrix.version }}${{ matrix.flavor }} && make -C pcov test' | |
| - name: Build xhprof image for testing | |
| uses: docker/build-push-action@v5 | |
| with: | |
| cache-to: type=inline | |
| context: ./xhprof | |
| build-args: | | |
| BASE_IMAGE=localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }} | |
| tags: localhost:5000/chialab/php-xhprof:${{ matrix.version }}${{ matrix.flavor }} | |
| push: true | |
| - name: Test xhprof image | |
| env: | |
| REGISTRY: localhost:5000/ | |
| VERSION: ${{ matrix.version }}${{ matrix.flavor }} | |
| run: 'docker pull localhost:5000/chialab/php-xhprof:${{ matrix.version }}${{ matrix.flavor }} && make -C xhprof test' |