Skip to content

Commit

Permalink
Merge pull request #195 from stellarwp/feature/add-php-83
Browse files Browse the repository at this point in the history
Feature: Add PHP 8.3 Docker Images
  • Loading branch information
defunctl committed Jun 6, 2024
2 parents 4105e2b + 701c2fd commit b69fcf3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 25 deletions.
24 changes: 7 additions & 17 deletions .github/workflows/publish-slic-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,40 +17,30 @@ jobs:
strategy:
matrix:
# The php_version is the docker tag from https://hub.docker.com/_/php/tags
include:
- image_suffix: '7.3'
php_version: '7.3.33'
- image_suffix: '7.4'
php_version: '7.4.33'
- image_suffix: '8.0'
php_version: '8.0.28'
- image_suffix: '8.1'
php_version: '8.1.16'
- image_suffix: '8.2'
php_version: '8.2.3'
php_version: [ '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Log in to the Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for image
id: meta
uses: docker/metadata-action@v4.3.0
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}-php${{ matrix.image_suffix }}
images: ghcr.io/${{ github.repository }}-php${{ matrix.php_version }}
tags: |
type=edge,branch=main
type=ref,event=branch
Expand All @@ -60,7 +50,7 @@ jobs:
- uses: docker/setup-buildx-action@v2

- name: Build and push Docker image
uses: docker/build-push-action@v3.3.1
uses: docker/build-push-action@v3
with:
context: containers/slic
file: containers/slic/Dockerfile
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/publish-wordpress-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,37 @@ jobs:
php_version: [ '8.0', '8.1', '8.2' ]
include:
# No WordPress image for version 6.2+ and PHP 7.3: use the latest 5.9 version.
# This version is NOT udpated in the containers/wordpress/Dockerfile for back-compatibility.
# This version is NOT updated in the containers/wordpress/Dockerfile for back-compatibility.
- wp_version: '5.9'
php_version: '7.3'
# No WordPress image for version 6.2+ and PHP 7.4: use the latest 6.1.1 version.
# See containers/wordpress/Dockerfile for the wp-cli update to version 6.2.
- wp_version: '6.1.1'
php_version: '7.4'
# Use the latest 6.5 WordPress version for PHP 8.3.
- wp_version: '6.5'
php_version: '8.3'

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Log in to the Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4.3.0
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}-wordpress-php${{ matrix.php_version }}
tags: |
Expand All @@ -56,10 +59,10 @@ jobs:
type=ref,event=tag
type=semver,pattern={{raw}}
- uses: docker/setup-buildx-action@v2
- uses: docker/setup-buildx-action@v3

- name: Build and push Docker image
uses: docker/build-push-action@v3.3.1
uses: docker/build-push-action@v5
continue-on-error: true
with:
context: containers/wordpress
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

# [Unreleased] - 2024-05-27
* Fixed - Properly read changes and restart stack after using the `slic php-version set` command.
* Added - PHP 8.3 docker images.
* Change - Update GitHub action versions to remove node notices.
* Change - Build slic images from the latest PHP patch versions.

# [1.6.3] - 2024-05-10
* Added - The `playwright` command to Playwright commands in the stack.
Expand Down
2 changes: 1 addition & 1 deletion containers/slic/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PHP_VERSION=7.4.33
ARG PHP_VERSION=7.4

# Source Composer 1 and 2 from the respective images, multi-layer builds.
FROM composer:1 AS composer1
Expand Down

0 comments on commit b69fcf3

Please sign in to comment.