Skip to content

Merge pull request #72 from phpdocker-io/2025-eol-cleanup #1214

Merge pull request #72 from phpdocker-io/2025-eol-cleanup

Merge pull request #72 from phpdocker-io/2025-eol-cleanup #1214

Workflow file for this run

name: build-all-containers
on:
pull_request:
push:
branches: [ master ]
# Allow workflow to be manually run from the GitHub UI
workflow_dispatch:
# Daily build
schedule:
- cron: "0 2 * * *"
jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.1', '8.2', '8.3', '8.4' ]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Debug
run: |
echo "is_master: -> ${{ github.ref == 'refs/heads/master' }} <-"
echo "ref: ${{ github.head_ref }}"
- name: Set up QEMU (required for arm build)
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: ${{ github.ref == 'refs/heads/master' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: PHP CLI container
uses: docker/build-push-action@v6
with:
context: php/${{ matrix.php }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.ref == 'refs/heads/master' }}
pull: true
# Enable BuildKit cache restore/save across workflow runs
cache-from: type=gha,scope=php-${{ matrix.php }}
cache-to: type=gha,mode=max,scope=php-${{ matrix.php }}
tags: phpdockerio/php:${{ matrix.php }}-cli
target: cli
- name: PHP FPM container
uses: docker/build-push-action@v6
with:
context: php/${{ matrix.php }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.ref == 'refs/heads/master' }}
pull: true
# Enable BuildKit cache restore/save across workflow runs
cache-from: type=gha,scope=php-${{ matrix.php }}
cache-to: type=gha,mode=max,scope=php-${{ matrix.php }}
tags: phpdockerio/php:${{ matrix.php }}-fpm
target: fpm