feat: add PHP 8.5 support and improve CI builds (#81)

* fix(renovate): pin PHP base images to digest-only updates

* feat(php85): add PHP 8.5 with Imagick and Composer

* ci: add php85 to build and PR matrices

* docs: update supported PHP version range to 8.5

* ci: enable GHA build cache for Docker image builds

* fix: address CR feedback — fix DOCKERFILE_PATH, renovate match, composer verify, drop python3-dev

* ci: use native arm64 runners for arm64 Docker builds

* ci: use build-by-digest with manifest merge for multi-arch images

Switch from direct per-arch push to a two-phase workflow:
1. Build phase pushes images by digest and uploads artifacts
2. Merge phase creates multi-arch manifest lists per PHP version

This ensures proper multi-arch manifest tags instead of
last-writer-wins race conditions between arch builds.

* fix: remove continue-on-error and suppress SC2046 shellcheck warning

Remove continue-on-error from build job so failed arch builds correctly
block the merge job from pushing incomplete manifests. Add shellcheck
disable directive for intentional word-splitting in manifest creation.
This commit is contained in:
2026-02-27 04:28:05 +02:00
committed by GitHub
parent 99d3e25d43
commit 92cb1405fa
5 changed files with 129 additions and 12 deletions

View File

@@ -21,7 +21,7 @@ permissions: read-all
jobs:
pr-build:
name: PR Build
runs-on: ubuntu-latest
runs-on: ${{ matrix.arch == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
timeout-minutes: 30
permissions:
@@ -33,7 +33,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [php74, php80, php81, php82, php83, php84]
php: [php74, php80, php81, php82, php83, php84, php85]
arch: ["linux/amd64", "linux/arm64"]
steps:
@@ -69,7 +69,7 @@ jobs:
- name: Extract base image
id: baseimage
run: |
BASE_IMAGE="$(grep -m1 '^FROM ' ${{ env.DOCKERFILE_PATH }} | awk '{print $2}')"
BASE_IMAGE="$(grep -m1 '^FROM ' ./${{ matrix.php }}/Dockerfile | awk '{print $2}')"
echo "base_image=$BASE_IMAGE" >> "$GITHUB_OUTPUT"
- name: Build Docker image (capture cache usage)
@@ -82,6 +82,8 @@ jobs:
docker buildx build \
--platform ${{ matrix.arch }} \
--tag "$IMAGE_TAG" \
--cache-from type=gha,scope=${{ matrix.php }}-${{ matrix.arch }} \
--cache-to type=gha,mode=max,scope=${{ matrix.php }}-${{ matrix.arch }} \
--progress plain \
--load ./${{ matrix.php }}/ | tee build.log
END="$(date +%s)"