Skip to content

Docker Image PHP-FPM #158

Docker Image PHP-FPM

Docker Image PHP-FPM #158

name: Docker Image PHP-FPM
on:
workflow_dispatch:
schedule:
- cron: "0 6 * * *" # 6 AM daily
pull_request:
push:
paths:
- .trigger
- php-fpm/**
- .github/workflows/*php-fpm*
- .github/workflows/php-matrix/**
branches:
- master
jobs:
php-matrix:
name: Generate Base PHP Matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
- id: matrix
run: |
php .github/workflows/php-matrix/php-generator.php >> $GITHUB_OUTPUT
- run: echo "Matrix:\n";echo '${{ steps.matrix.outputs.matrix }}'
node-matrix:
name: Generate Base PHP-Node Matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
- id: matrix
run: |
php .github/workflows/php-matrix/node-generator.php >> $GITHUB_OUTPUT
- run: echo "Matrix:\n";echo '${{ steps.matrix.outputs.matrix }}'
full-matrix:
name: Generate Full Matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
- id: matrix
run: |
php .github/workflows/php-matrix/full-generator.php >> $GITHUB_OUTPUT
- run: echo "Matrix:\n";echo '${{ steps.matrix.outputs.matrix }}'
php-fpm:
needs: php-matrix
name: PHP-FPM ${{ matrix.php_version }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.continue_on_error || false }}
strategy:
fail-fast: false
matrix: ${{fromJson(needs.php-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:v0.10.6
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ !env.ACT }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: ${{ !env.ACT }}
- uses: docker/build-push-action@v6
with:
file: php-fpm/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
PHP_VERSION=${{ matrix.php_version }}
OS_RELEASE=${{ matrix.php_os_release }}
ENV_SOURCE_IMAGE=php
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm:${{ matrix.php_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm:${{ matrix.php_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm:${{ matrix.php_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.latest }}
with:
file: php-fpm/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
PHP_VERSION=${{ matrix.php_version }}
OS_RELEASE=${{ matrix.php_os_release }}
ENV_SOURCE_IMAGE=php
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm:latest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm:${{ matrix.php_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm:${{ matrix.php_version }}-buildcache,mode=max
php-node:
name: PHP-FPM ${{ matrix.php_version }} + Node ${{ matrix.node_version }}
runs-on: ubuntu-latest
needs: [ php-fpm, node-matrix ]
continue-on-error: ${{ matrix.continue_on_error || false }}
strategy:
fail-fast: false
max-parallel: ${{ github.ref == 'refs/heads/master' && 6 || 0 }}
matrix: ${{fromJson(needs.node-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:v0.10.6
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ !env.ACT }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: ${{ !env.ACT }}
- uses: docker/build-push-action@v6
with:
file: php-fpm/node/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}
NODE_VERSION=${{ matrix.node_version }}
OS_RELEASE=${{ matrix.node_os_release }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm:${{ matrix.php_version }}-node${{ matrix.node_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.latest }}
with:
file: php-fpm/node/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}
NODE_VERSION=${{ matrix.node_version }}
OS_RELEASE=${{ matrix.node_os_release }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm:latest-nodelatest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
xdebug:
name: PHP-FPM ${{ matrix.php_version }} + XDebug - Node ${{ matrix.node_version }}
runs-on: ubuntu-latest
needs: [ php-node, full-matrix ]
continue-on-error: ${{ matrix.continue_on_error || false }}
strategy:
fail-fast: false
max-parallel: ${{ github.ref == 'refs/heads/master' && 2 || 0 }}
matrix: ${{fromJson(needs.full-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:v0.10.6
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ !env.ACT }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: ${{ !env.ACT }}
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version!='x' }}
with:
file: php-fpm/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}-node${{ matrix.node_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version=='x' }}
with:
file: php-fpm/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-debug:${{ matrix.php_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version!='x' && matrix.latest }}
with:
file: php-fpm/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}-node${{ matrix.node_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-debug:latest-nodelatest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version=='x' && matrix.latest }}
with:
file: php-fpm/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-debug:latest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
magento1:
name: Magento 1 PHP-FPM ${{ matrix.php_version }} - Node ${{ matrix.node_version }}
runs-on: ubuntu-latest
needs: [ full-matrix, php-node ]
continue-on-error: ${{ matrix.continue_on_error || false }}
strategy:
fail-fast: false
max-parallel: ${{ github.ref == 'refs/heads/master' && 2 || 0 }}
matrix: ${{fromJson(needs.full-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:v0.10.6
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ !env.ACT }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: ${{ !env.ACT }}
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version!='x' }}
with:
file: php-fpm/magento1/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}-node${{ matrix.node_version }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento1:${{ matrix.php_version }}-node${{ matrix.node_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version=='x' }}
with:
file: php-fpm/magento1/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento1:${{ matrix.php_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version!='x' && matrix.latest }}
with:
file: php-fpm/magento1/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}-node${{ matrix.node_version }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento1:latest-nodelatest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version=='x' && matrix.latest }}
with:
file: php-fpm/magento1/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento1:latest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
magento1-xdebug:
name: Magento 1 PHP-FPM ${{ matrix.php_version }} + XDebug - Node ${{ matrix.node_version }}
runs-on: ubuntu-latest
needs: [ full-matrix, magento1 ]
continue-on-error: ${{ matrix.continue_on_error || false }}
strategy:
fail-fast: false
max-parallel: ${{ github.ref == 'refs/heads/master' && 2 || 0 }}
matrix: ${{fromJson(needs.full-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:v0.10.6
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ !env.ACT }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: ${{ !env.ACT }}
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version!='x' }}
with:
file: php-fpm/magento1/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1
PHP_VERSION=${{ matrix.php_version }}-node${{ matrix.node_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento1-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version=='x' }}
with:
file: php-fpm/magento1/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1
PHP_VERSION=${{ matrix.php_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento1-debug:${{ matrix.php_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version!='x' && matrix.latest }}
with:
file: php-fpm/magento1/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1
PHP_VERSION=${{ matrix.php_version }}-node${{ matrix.node_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento1-debug:latest-nodelatest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version=='x' && matrix.latest }}
with:
file: php-fpm/magento1/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1
PHP_VERSION=${{ matrix.php_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento1-debug:latest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento1-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
magento2:
name: Magento 2 PHP-FPM ${{ matrix.php_version }} - Node ${{ matrix.node_version }}
runs-on: ubuntu-latest
needs: [ full-matrix, php-node ]
continue-on-error: ${{ matrix.continue_on_error || false }}
strategy:
fail-fast: false
max-parallel: ${{ github.ref == 'refs/heads/master' && 2 || 0 }}
matrix: ${{fromJson(needs.full-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:v0.10.6
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ !env.ACT }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: ${{ !env.ACT }}
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version!='x' }}
with:
file: php-fpm/magento2/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}-node${{ matrix.node_version }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento2:${{ matrix.php_version }}-node${{ matrix.node_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version=='x' }}
with:
file: php-fpm/magento2/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento2:${{ matrix.php_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version!='x' && matrix.latest }}
with:
file: php-fpm/magento2/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}-node${{ matrix.node_version }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento2:latest-nodelatest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version=='x' && matrix.latest }}
with:
file: php-fpm/magento2/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento2:latest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
magento2-xdebug:
name: Magento 2 PHP-FPM ${{ matrix.php_version }} + XDebug - Node ${{ matrix.node_version }}
runs-on: ubuntu-latest
needs: [ full-matrix, magento2 ]
continue-on-error: ${{ matrix.continue_on_error || false }}
strategy:
fail-fast: false
max-parallel: ${{ github.ref == 'refs/heads/master' && 2 || 0 }}
matrix: ${{fromJson(needs.full-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:v0.10.6
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ !env.ACT }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: ${{ !env.ACT }}
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version!='x' }}
with:
file: php-fpm/magento2/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2
PHP_VERSION=${{ matrix.php_version }}-node${{ matrix.node_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento2-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version=='x' }}
with:
file: php-fpm/magento2/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2
PHP_VERSION=${{ matrix.php_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento2-debug:${{ matrix.php_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version!='x' && matrix.latest }}
with:
file: php-fpm/magento2/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2
PHP_VERSION=${{ matrix.php_version }}-node${{ matrix.node_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento2-debug:latest-nodelatest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version=='x' && matrix.latest }}
with:
file: php-fpm/magento2/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2
PHP_VERSION=${{ matrix.php_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-magento2-debug:latest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-magento2-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
wordpress:
name: Wordpress PHP-FPM ${{ matrix.php_version }} - Node ${{ matrix.node_version }}
runs-on: ubuntu-latest
needs: [ full-matrix, php-node ]
continue-on-error: ${{ matrix.continue_on_error || false }}
strategy:
fail-fast: false
max-parallel: ${{ github.ref == 'refs/heads/master' && 2 || 0 }}
matrix: ${{fromJson(needs.full-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:v0.10.6
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ !env.ACT }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: ${{ !env.ACT }}
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version!='x' }}
with:
file: php-fpm/wordpress/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}-node${{ matrix.node_version }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress:${{ matrix.php_version }}-node${{ matrix.node_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version=='x' }}
with:
file: php-fpm/wordpress/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress:${{ matrix.php_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version!='x' && matrix.latest }}
with:
file: php-fpm/wordpress/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}-node${{ matrix.node_version }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress:latest-nodelatest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version=='x' && matrix.latest }}
with:
file: php-fpm/wordpress/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm
PHP_VERSION=${{ matrix.php_version }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress:latest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
wordpress-xdebug:
name: Wordpress PHP-FPM ${{ matrix.php_version }} + XDebug - Node ${{ matrix.node_version }}
runs-on: ubuntu-latest
needs: [ full-matrix, wordpress ]
continue-on-error: ${{ matrix.continue_on_error || false }}
strategy:
fail-fast: false
max-parallel: ${{ github.ref == 'refs/heads/master' && 2 || 0 }}
matrix: ${{fromJson(needs.full-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:v0.10.6
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ !env.ACT }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: ${{ !env.ACT }}
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version!='x' }}
with:
file: php-fpm/wordpress/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress
PHP_VERSION=${{ matrix.php_version }}-node${{ matrix.node_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version=='x' }}
with:
file: php-fpm/wordpress/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress
PHP_VERSION=${{ matrix.php_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress-debug:${{ matrix.php_version }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version!='x' && matrix.latest }}
with:
file: php-fpm/wordpress/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress
PHP_VERSION=${{ matrix.php_version }}-node${{ matrix.node_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress-debug:latest-nodelatest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max
- uses: docker/build-push-action@v6
if: ${{ matrix.node_version=='x' && matrix.latest }}
with:
file: php-fpm/wordpress/xdebug3/Dockerfile
context: php-fpm/context
platforms: linux/amd64,linux/arm64
build-args: |
ENV_SOURCE_IMAGE=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress
PHP_VERSION=${{ matrix.php_version }}
XDEBUG_TYPE=${{ matrix.xdebug_type }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress-debug:latest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/php-fpm-wordpress-debug:${{ matrix.php_version }}-node${{ matrix.node_version }}-buildcache,mode=max