fix: revert to using official PHP images to preserve arm64 architecture

This commit is contained in:
le0m
2026-01-29 11:25:17 +01:00
parent fd7791fb8a
commit af1e83bc91
10 changed files with 252 additions and 57 deletions
+11 -7
View File
@@ -15,11 +15,6 @@ jobs:
matrix:
version: [ '5.6' ]
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
include:
- version: 'latest'
flavor: ''
- version: 'alpine'
flavor: ''
exclude:
- version: '5.6'
flavor: '-alpine'
@@ -38,7 +33,16 @@ jobs:
with:
driver-opts: network=host
- name: Login to DockerHub
- name: Login to DockerHub (pull)
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 chialab/php:${{ matrix.version }}${{ matrix.flavor }}
- name: Login to DockerHub (push)
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
@@ -60,7 +64,7 @@ jobs:
context: .
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
build-args: |
BASE_IMAGE=ghcr.io/chialab/php-mirror:${{ matrix.version }}${{ matrix.flavor }}
BASE_IMAGE=chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: |
chialab/php:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
+11 -7
View File
@@ -15,11 +15,6 @@ jobs:
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'
@@ -38,7 +33,16 @@ jobs:
with:
driver-opts: network=host
- name: Login to DockerHub
- name: Login to DockerHub (pull)
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 chialab/php:${{ matrix.version }}${{ matrix.flavor }}
- name: Login to DockerHub (push)
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
@@ -60,7 +64,7 @@ jobs:
context: .
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
build-args: |
BASE_IMAGE=ghcr.io/chialab/php-mirror:${{ matrix.version }}${{ matrix.flavor }}
BASE_IMAGE=chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: |
chialab/php:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
+11 -7
View File
@@ -15,11 +15,6 @@ jobs:
matrix:
version: [ '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
include:
- version: 'latest'
flavor: ''
- version: 'alpine'
flavor: ''
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -33,7 +28,16 @@ jobs:
with:
driver-opts: network=host
- name: Login to DockerHub
- name: Login to DockerHub (pull)
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 chialab/php:${{ matrix.version }}${{ matrix.flavor }}
- name: Login to DockerHub (push)
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
@@ -55,7 +59,7 @@ jobs:
context: .
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
build-args: |
BASE_IMAGE=ghcr.io/chialab/php-mirror:${{ matrix.version }}${{ matrix.flavor }}
BASE_IMAGE=chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: |
chialab/php:${{ matrix.version }}${{ matrix.flavor }}
ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
+2 -2
View File
@@ -31,8 +31,8 @@ jobs:
- name: Login to DockerHub (pull)
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_PULL_USER_1 }}
password: ${{ secrets.DOCKER_PULL_PASS_1 }}
username: ${{ secrets.DOCKER_PULL_USER_4 }}
password: ${{ secrets.DOCKER_PULL_PASS_4 }}
- name: Pull base image
run: |
+103
View File
@@ -0,0 +1,103 @@
name: Publish latest PHP images
on:
workflow_run:
workflows: ["Test latest PHP 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: [ 'latest', '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 (pull)
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_PULL_USER_5 }}
password: ${{ secrets.DOCKER_PULL_PASS_5 }}
- name: Pull base image
run: docker pull chialab/php:${{ matrix.version }}
- name: Login to DockerHub (push)
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=ghcr.io/chialab/php:${{ matrix.version }}
cache-to: type=inline
context: .
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
build-args: |
BASE_IMAGE=chialab/php:${{ matrix.version }}
tags: |
chialab/php:${{ matrix.version }}
ghcr.io/chialab/php:${{ matrix.version }}
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 }}
tags: |
chialab/php-dev:${{ matrix.version }}
ghcr.io/chialab/php-dev:${{ matrix.version }}
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 }}
tags: |
chialab/php-pcov:${{ matrix.version }}
ghcr.io/chialab/php-pcov:${{ matrix.version }}
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 }}
tags: |
chialab/php-xhprof:${{ matrix.version }}
ghcr.io/chialab/php-xhprof:${{ matrix.version }}
push: true
+4 -10
View File
@@ -18,11 +18,6 @@ jobs:
matrix:
version: [ '5.6' ]
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
include:
- version: 'latest'
flavor: ''
- version: 'alpine'
flavor: ''
exclude:
- version: '5.6'
flavor: '-alpine'
@@ -37,12 +32,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ secrets.DOCKER_PULL_USER_1 }}
password: ${{ secrets.DOCKER_PULL_PASS_1 }}
- name: Build image for testing
uses: docker/build-push-action@v5
@@ -52,7 +46,7 @@ jobs:
context: .
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
build-args: |
BASE_IMAGE=ghcr.io/chialab/php-mirror:${{ matrix.version }}${{ matrix.flavor }}
BASE_IMAGE=chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
push: true
+4 -10
View File
@@ -18,11 +18,6 @@ jobs:
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'
@@ -37,12 +32,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ secrets.DOCKER_PULL_USER_2 }}
password: ${{ secrets.DOCKER_PULL_PASS_2 }}
- name: Build image for testing
uses: docker/build-push-action@v5
@@ -52,7 +46,7 @@ jobs:
context: .
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
build-args: |
BASE_IMAGE=ghcr.io/chialab/php-mirror:${{ matrix.version }}${{ matrix.flavor }}
BASE_IMAGE=chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
push: true
+4 -10
View File
@@ -18,11 +18,6 @@ jobs:
matrix:
version: [ '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
include:
- version: 'latest'
flavor: ''
- version: 'alpine'
flavor: ''
services:
registry:
image: registry:2
@@ -32,12 +27,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ secrets.DOCKER_PULL_USER_3 }}
password: ${{ secrets.DOCKER_PULL_PASS_3 }}
- name: Build image for testing
uses: docker/build-push-action@v5
@@ -47,7 +41,7 @@ jobs:
context: .
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
build-args: |
BASE_IMAGE=ghcr.io/chialab/php-mirror:${{ matrix.version }}${{ matrix.flavor }}
BASE_IMAGE=chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
push: true
+3 -4
View File
@@ -5,8 +5,7 @@ on:
# chosen by fair dice roll
- cron: '42 18 * * 2'
push:
branches:
- main
branches: [main]
pull_request:
types: [opened, synchronize]
@@ -31,8 +30,8 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_PULL_USER_1 }}
password: ${{ secrets.DOCKER_PULL_PASS_1 }}
username: ${{ secrets.DOCKER_PULL_USER_4 }}
password: ${{ secrets.DOCKER_PULL_PASS_4 }}
- name: Build image for testing
uses: docker/build-push-action@v5
+99
View File
@@ -0,0 +1,99 @@
name: Test latest PHP images
on:
schedule:
# chosen by fair dice roll
- cron: '42 18 * * 1'
push:
branches: [main]
pull_request:
types: [opened, synchronize]
jobs:
test-latest:
name: Build and test latest PHP 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: [ 'latest', '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_5 }}
password: ${{ secrets.DOCKER_PULL_PASS_5 }}
- name: Build image for testing
uses: docker/build-push-action@v5
with:
cache-from: type=registry,ref=ghcr.io/chialab/php:${{ matrix.version }}
cache-to: type=inline
context: .
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
build-args: |
BASE_IMAGE=chialab/php:${{ matrix.version }}
tags: localhost:5000/chialab/php:${{ matrix.version }}
push: true
- name: Test image
env:
REGISTRY: localhost:5000/
VERSION: ${{ matrix.version }}
run: 'docker pull localhost:5000/chialab/php:${{ matrix.version }} && 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 }}
tags: localhost:5000/chialab/php-dev:${{ matrix.version }}
push: true
- name: Test dev image
env:
REGISTRY: localhost:5000/
VERSION: ${{ matrix.version }}
run: 'docker pull localhost:5000/chialab/php-dev:${{ matrix.version }} && 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 }}
tags: localhost:5000/chialab/php-pcov:${{ matrix.version }}
push: true
- name: Test PCOV image
env:
REGISTRY: localhost:5000/
VERSION: ${{ matrix.version }}
run: 'docker pull localhost:5000/chialab/php-pcov:${{ matrix.version }} && 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 }}
tags: localhost:5000/chialab/php-xhprof:${{ matrix.version }}
push: true
- name: Test xhprof image
env:
REGISTRY: localhost:5000/
VERSION: ${{ matrix.version }}
run: 'docker pull localhost:5000/chialab/php-xhprof:${{ matrix.version }} && make -C xhprof test'