Skip to content

Extensions and Clients #447

Extensions and Clients

Extensions and Clients #447

name: Build PHP Images
on:
pull_request:
paths:
- 'images/**'
- '.github/workflows/build-php-images.yml'
push:
branches:
- main
paths:
- 'images/**'
- '.github/workflows/build-php-images.yml'
workflow_dispatch:
jobs:
buildx:
runs-on: ubuntu-24.04
env:
TERM: xterm
strategy:
fail-fast: false
matrix:
include:
- image: php
tag: 8.4-fpm-5
context: images/8.4-fpm
- image: php
tag: 8.4-apache-5
context: images/8.4-apache
- image: php
tag: 8.3-fpm-5
context: images/8.3-fpm
- image: php
tag: 8.3-apache-5
context: images/8.3-apache
- image: php
tag: 8.2-fpm-5
context: images/8.2-fpm
- image: php
tag: 8.2-apache-5
context: images/8.2-apache
- image: php
tag: 8.1-fpm-5
context: images/8.1-fpm
- image: php
tag: 8.1-apache-5
context: images/8.1-apache
- image: php
tag: 8.0-fpm-5
context: images/8.0-fpm
- image: php
tag: 8.0-apache-5
context: images/8.0-apache
- image: php
tag: 7.4-fpm-5
context: images/7.4-fpm
- image: php
tag: 7.4-apache-5
context: images/7.4-apache
- image: php
tag: 7.3-fpm-5
context: images/7.3-fpm
- image: php
tag: 7.3-apache-5
context: images/7.3-apache
- image: php
tag: 7.2-fpm-5
context: images/7.2-fpm
- image: php
tag: 7.2-apache-5
context: images/7.2-apache
- image: php
tag: 7.1-fpm-5
context: images/7.1-fpm
- image: php
tag: 7.1-apache-5
context: images/7.1-apache
- image: php
tag: 7.0-fpm-5
context: images/7.0-fpm
- image: php
tag: 7.0-apache-5
context: images/7.0-apache
- image: php
tag: 5.6-fpm-5
context: images/5.6-fpm
- image: php
tag: 5.6-apache-5
context: images/5.6-apache
steps:
- name: Checkout code
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
- name: Set tag suffix
id: release
if: ${{ github.event_name == 'pull_request' }}
run: echo "tag_suffix=-edge" >> "$GITHUB_OUTPUT"
# Build our images.
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push devwithlando/${{ matrix.image }}:${{ matrix.tag }}${{ steps.release.outputs.tag_suffix }}
uses: docker/build-push-action@v6
with:
context: ${{ matrix.context }}
platforms: linux/amd64,linux/arm64
push: true
tags: devwithlando/${{ matrix.image }}:${{ matrix.tag }}${{ steps.release.outputs.tag_suffix }}
cache-from: type=gha,scope=${{ matrix.image }}-${{ matrix.tag }}
cache-to: type=gha,mode=max,scope=${{ matrix.image }}-${{ matrix.tag }}