Skip to content

Commit

Permalink
[TASK] Add PHP 8.3 and update extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
t3easy committed Jan 31, 2024
1 parent b1977ec commit 20d3f29
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
32 changes: 18 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,60 +20,64 @@ jobs:
strategy:
matrix:
include:
- php: "8.3"
php-ext-dir: /usr/local/lib/php/extensions/no-debug-non-zts-20230831
alpine: "3.19"
xdebug: "3.3.1"
- php: "8.2"
php-ext-dir: /usr/local/lib/php/extensions/no-debug-non-zts-20220829
alpine: "3.18"
xdebug: "3.2.1"
alpine: "3.19"
xdebug: "3.3.1"
- php: "8.1"
php-ext-dir: /usr/local/lib/php/extensions/no-debug-non-zts-20210902
alpine: "3.18"
xdebug: "3.2.1"
alpine: "3.19"
xdebug: "3.3.1"
- php: "8.0"
php-ext-dir: /usr/local/lib/php/extensions/no-debug-non-zts-20200930
alpine: "3.16"
xdebug: "3.2.1"
xdebug: "3.3.1"
- php: "7.4"
php-ext-dir: /usr/local/lib/php/extensions/no-debug-non-zts-20190902
alpine: "3.16"
xdebug: "3.1.6"

env:
LATEST_PHP: "8.2"
LATEST_PHP: "8.3"
IMAGE_NAME: t3easy/php
PLATFORMS: linux/amd64,linux/arm64

steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push latest image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
if: ${{ matrix.php == env.LATEST_PHP }}
with:
push: ${{ github.event_name != 'pull_request' }}
Expand All @@ -94,7 +98,7 @@ jobs:
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: Build and push production images
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
if: ${{ matrix.php != env.LATEST_PHP }}
with:
push: ${{ github.event_name != 'pull_request' }}
Expand All @@ -114,7 +118,7 @@ jobs:
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: Build and push development images
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name != 'pull_request' }}
platforms: ${{ env.PLATFORMS }}
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# syntax=docker/dockerfile:1
ARG PHP_VERSION=8.2
ARG PHP_EXT_DIR=/usr/local/lib/php/extensions/no-debug-non-zts-20220829
ARG PHP_VERSION=8.3
ARG PHP_EXT_DIR=/usr/local/lib/php/extensions/no-debug-non-zts-20230831
ARG TARGET_ENVIRONMENT=production
ARG BUILD_PLATFORM=alpine
ARG ALPINE_VERSION=3.18
ARG ALPINE_VERSION=3.19

# https://github.com/krakjoe/apcu/releases
ARG APCU_VERSION=5.1.22
ARG APCU_VERSION=5.1.23
# https://github.com/phpredis/phpredis/tags
ARG REDIS_VERSION=5.3.7
ARG REDIS_VERSION=6.0.2
# https://github.com/xdebug/xdebug/tags
ARG XDEBUG_VERSION=3.2.1
ARG XDEBUG_VERSION=3.3.1
# https://github.com/php/pecl-file_formats-yaml/tags
ARG YAML_VERSION=2.2.3

Expand Down

0 comments on commit 20d3f29

Please sign in to comment.