chore: split workflows by php version

This commit is contained in:
le0m
2026-01-26 19:37:41 +01:00
parent 2f02bea3ae
commit e119f49d47
10 changed files with 756 additions and 313 deletions
-93
View File
@@ -1,93 +0,0 @@
name: Build, test and publish compatibility images
on:
schedule:
# chosen by fair dice roll
- cron: '42 18 * * 4'
push:
branches:
- main
pull_request:
types: [opened, synchronize]
jobs:
test:
name: Build and test 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: [ '5.6' ]
flavor: [ '', '-apache', '-fpm' ]
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build image for testing
uses: docker/build-push-action@v5
with:
cache-from: type=registry,ref=chialab/php-compat:${{ matrix.version }}${{ matrix.flavor }}
cache-to: type=inline
context: ./compat
file: ${{ format('compat/{0}.{1}{2}', 'Dockerfile', matrix.version, matrix.flavor) }}
tags: localhost:5000/chialab/php-compat:${{ 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-compat:${{ matrix.version }}${{ matrix.flavor }} && make -C compat test'
publish:
name: Build and publish multi-architecture images
runs-on: ubuntu-22.04
needs: test
if: ${{ github.event_name != 'pull_request' && !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
strategy:
matrix:
version: [ '5.6' ]
flavor: [ '', '-apache', '-fpm' ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- 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 and push to registry
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=chialab/php-compat:${{ matrix.version }}${{ matrix.flavor }}
cache-to: type=inline
context: ./compat
file: ${{ format('compat/{0}.{1}{2}', 'Dockerfile', matrix.version, matrix.flavor) }}
tags: |
chialab/php-compat:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php-compat:${{ matrix.version }}${{ matrix.flavor }}
push: true
-220
View File
@@ -1,220 +0,0 @@
name: Build, test and publish images
on:
schedule:
# chosen by fair dice roll
- cron: '42 18 * * 3'
push:
branches:
- main
pull_request:
types: [opened, synchronize]
jobs:
test:
name: Build and test 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: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
include:
- version: 'latest'
flavor: ''
- version: 'alpine'
flavor: ''
exclude:
- version: '5.6'
flavor: '-alpine'
- version: '5.6'
flavor: '-fpm-alpine'
- version: '7.0'
flavor: '-alpine'
- version: '7.0'
flavor: '-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_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build image for testing
uses: docker/build-push-action@v5
with:
cache-from: type=registry,ref=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
if: ${{ matrix.version >= 7.1 }}
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
if: ${{ matrix.version >= 7.1 }}
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'
publish:
name: Build and publish multi-architecture images
runs-on: ubuntu-22.04
needs: test
if: ${{ github.event_name != 'pull_request' && !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
strategy:
matrix:
version: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
include:
- version: 'latest'
flavor: ''
- version: 'alpine'
flavor: ''
exclude:
- version: '5.6'
flavor: '-alpine'
- version: '5.6'
flavor: '-fpm-alpine'
- version: '7.0'
flavor: '-alpine'
- version: '7.0'
flavor: '-fpm-alpine'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- 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 and push to registry
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=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: |
chialab/php:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
push: true
- name: Build dev image and push to registry
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
cache-to: type=inline
context: ./dev
build-args: |
BASE_IMAGE=ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: |
chialab/php-dev:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php-dev:${{ matrix.version }}${{ matrix.flavor }}
push: true
- name: Build PCOV image and push to registry
if: ${{ matrix.version >= 7.1 }}
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
cache-to: type=inline
context: ./pcov
build-args: |
BASE_IMAGE=ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: |
chialab/php-pcov:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php-pcov:${{ matrix.version }}${{ matrix.flavor }}
push: true
- name: Build xhprof image (amd64 only) and push to registry
uses: docker/build-push-action@v5
with:
cache-to: type=inline
context: ./xhprof
build-args: |
BASE_IMAGE=ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: |
chialab/php-xhprof:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php-xhprof:${{ matrix.version }}${{ matrix.flavor }}
push: true
+102
View File
@@ -0,0 +1,102 @@
name: Publish PHP 5 images
on:
workflow_run:
workflows: ["Test PHP 5 images"]
branches: [main]
types: [completed]
jobs:
publish-5:
name: Build and publish PHP 5 images
runs-on: ubuntu-22.04
if: ${{ github.event_name != 'pull_request' && !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
strategy:
matrix:
version: [ '5.6' ]
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
include:
- version: 'latest'
flavor: ''
- version: 'alpine'
flavor: ''
exclude:
- version: '5.6'
flavor: '-alpine'
- version: '5.6'
flavor: '-fpm-alpine'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_PULL_USER_3 }}
password: ${{ secrets.DOCKER_PULL_PASS_3 }}
- name: Pull base image
run: |
docker pull php:${{ matrix.version }}${{ matrix.flavor }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- 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 and push to registry
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=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: |
chialab/php:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
push: true
- name: Build dev image and push to registry
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
cache-to: type=inline
context: ./dev
build-args: |
BASE_IMAGE=ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: |
chialab/php-dev:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php-dev:${{ matrix.version }}${{ matrix.flavor }}
push: true
- name: Build xhprof image (amd64 only) and push to registry
uses: docker/build-push-action@v5
with:
cache-to: type=inline
context: ./xhprof
build-args: |
BASE_IMAGE=ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: |
chialab/php-xhprof:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php-xhprof:${{ matrix.version }}${{ matrix.flavor }}
push: true
+116
View File
@@ -0,0 +1,116 @@
name: Publish PHP 7 images
on:
workflow_run:
workflows: ["Test PHP 7 images"]
branches: [main]
types: [completed]
jobs:
publish-7:
name: Build and publish PHP 7 images
runs-on: ubuntu-22.04
if: ${{ github.event.workflow_run.conclusion == 'success' && !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
strategy:
matrix:
version: [ '7.0', '7.1', '7.2', '7.3', '7.4' ]
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
include:
- version: 'latest'
flavor: ''
- version: 'alpine'
flavor: ''
exclude:
- version: '7.0'
flavor: '-alpine'
- version: '7.0'
flavor: '-fpm-alpine'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_PULL_USER_2 }}
password: ${{ secrets.DOCKER_PULL_PASS_2 }}
- name: Pull base image
run: |
docker pull php:${{ matrix.version }}${{ matrix.flavor }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- 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 and push to registry
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=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: |
chialab/php:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
push: true
- name: Build dev image and push to registry
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
cache-to: type=inline
context: ./dev
build-args: |
BASE_IMAGE=ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: |
chialab/php-dev:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php-dev:${{ matrix.version }}${{ matrix.flavor }}
push: true
- name: Build PCOV image and push to registry
if: ${{ matrix.version >= 7.1 }}
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
cache-to: type=inline
context: ./pcov
build-args: |
BASE_IMAGE=ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: |
chialab/php-pcov:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php-pcov:${{ matrix.version }}${{ matrix.flavor }}
push: true
- name: Build xhprof image (amd64 only) and push to registry
uses: docker/build-push-action@v5
with:
cache-to: type=inline
context: ./xhprof
build-args: |
BASE_IMAGE=ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: |
chialab/php-xhprof:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php-xhprof:${{ matrix.version }}${{ matrix.flavor }}
push: true
+110
View File
@@ -0,0 +1,110 @@
name: Publish PHP 8 images
on:
workflow_run:
workflows: ["Test PHP 8 images"]
branches: [main]
types: [completed]
jobs:
publish-8:
name: Build and publish PHP 8 images
runs-on: ubuntu-22.04
if: ${{ github.event.workflow_run.conclusion == 'success' && !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' ]
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
include:
- version: 'latest'
flavor: ''
- version: 'alpine'
flavor: ''
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_PULL_USER_1 }}
password: ${{ secrets.DOCKER_PULL_PASS_1 }}
- name: Pull base image
run: |
docker pull php:${{ matrix.version }}${{ matrix.flavor }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- 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 and push to registry
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=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: |
chialab/php:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
push: true
- name: Build dev image and push to registry
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
cache-to: type=inline
context: ./dev
build-args: |
BASE_IMAGE=ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: |
chialab/php-dev:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php-dev:${{ matrix.version }}${{ matrix.flavor }}
push: true
- name: Build PCOV image and push to registry
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
cache-to: type=inline
context: ./pcov
build-args: |
BASE_IMAGE=ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: |
chialab/php-pcov:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php-pcov:${{ matrix.version }}${{ matrix.flavor }}
push: true
- name: Build xhprof image (amd64 only) and push to registry
uses: docker/build-push-action@v5
with:
cache-to: type=inline
context: ./xhprof
build-args: |
BASE_IMAGE=ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: |
chialab/php-xhprof:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php-xhprof:${{ matrix.version }}${{ matrix.flavor }}
push: true
+65
View File
@@ -0,0 +1,65 @@
name: Publish compatibility images
on:
workflow_run:
workflows: ["Test compatibility images"]
branches: [main]
types: [completed]
jobs:
publish-compat:
name: Build and publish compatibility images
runs-on: ubuntu-22.04
if: ${{ github.event.workflow_run.conclusion == 'success' && !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
strategy:
matrix:
version: [ '5.6' ]
flavor: [ '', '-apache', '-fpm' ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_PULL_USER_3 }}
password: ${{ secrets.DOCKER_PULL_PASS_3 }}
- name: Pull base image
run: |
docker pull debian:stretch-slim
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- 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 and push to registry
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=chialab/php-compat:${{ matrix.version }}${{ matrix.flavor }}
cache-to: type=inline
context: ./compat
file: ${{ format('compat/{0}.{1}{2}', 'Dockerfile', matrix.version, matrix.flavor) }}
tags: |
chialab/php-compat:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php-compat:${{ matrix.version }}${{ matrix.flavor }}
push: true
+95
View File
@@ -0,0 +1,95 @@
name: Test PHP 5 images
on:
schedule:
# chosen by fair dice roll
- cron: '42 18 * * 5'
push:
branches: [main]
pull_request:
types: [opened, synchronize]
jobs:
test-5:
name: Build and test PHP 5 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: [ '5.6' ]
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
include:
- version: 'latest'
flavor: ''
- version: 'alpine'
flavor: ''
exclude:
- version: '5.6'
flavor: '-alpine'
- version: '5.6'
flavor: '-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=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 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'
+112
View File
@@ -0,0 +1,112 @@
name: Test PHP 7 images
on:
schedule:
# chosen by fair dice roll
- cron: '42 18 * * 4'
push:
branches: [main]
pull_request:
types: [opened, synchronize]
jobs:
test-7:
name: Build and test PHP 7 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: ['7.0', '7.1', '7.2', '7.3', '7.4' ]
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
include:
- version: 'latest'
flavor: ''
- version: 'alpine'
flavor: ''
exclude:
- version: '7.0'
flavor: '-alpine'
- version: '7.0'
flavor: '-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_2 }}
password: ${{ secrets.DOCKER_PULL_PASS_2 }}
- name: Build image for testing
uses: docker/build-push-action@v5
with:
cache-from: type=registry,ref=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
if: ${{ matrix.version >= 7.1 }}
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
if: ${{ matrix.version >= 7.1 }}
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'
+105
View File
@@ -0,0 +1,105 @@
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' ]
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: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_PULL_USER_1 }}
password: ${{ secrets.DOCKER_PULL_PASS_1 }}
- name: Build image for testing
uses: docker/build-push-action@v5
with:
cache-from: type=registry,ref=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'
+51
View File
@@ -0,0 +1,51 @@
name: Test compatibility images
on:
schedule:
# chosen by fair dice roll
- cron: '42 18 * * 2'
push:
branches:
- main
pull_request:
types: [opened, synchronize]
jobs:
test-compat:
name: Build and test compatibility 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: [ '5.6' ]
flavor: [ '', '-apache', '-fpm' ]
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=chialab/php-compat:${{ matrix.version }}${{ matrix.flavor }}
cache-to: type=inline
context: ./compat
file: ${{ format('compat/{0}.{1}{2}', 'Dockerfile', matrix.version, matrix.flavor) }}
tags: localhost:5000/chialab/php-compat:${{ 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-compat:${{ matrix.version }}${{ matrix.flavor }} && make -C compat test'