Merge pull request #136 from chialab/chore/arm-php-5.6-again #22
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-latest | |
| 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' ] | |
| services: | |
| registry: | |
| image: registry:2 | |
| ports: | |
| - 5000:5000 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_PULL_USER_3 }} | |
| password: ${{ secrets.DOCKER_PULL_PASS_3 }} | |
| - 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=php:${{ 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' |