Skip to content

Commit

Permalink
build(.githug, containers/wordpress) remedy PHP 7.4 missing wp 6.2 su…
Browse files Browse the repository at this point in the history
…pport
  • Loading branch information
lucatume committed Aug 15, 2023
1 parent 38e4338 commit dccaf1e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/publish-wordpress-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ jobs:
strategy:
matrix:
wp_version: [ '6.2' ]
php_version: [ '7.4', '8.0', '8.1', '8.2' ]
php_version: [ '8.0', '8.1', '8.2' ]
include:
# WordPress did not publish any 6.x images for PHP 7.3, use the latest 5.9 patch.
# 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.
- 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'

steps:
- name: Checkout repository
Expand Down
10 changes: 10 additions & 0 deletions containers/wordpress/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,13 @@ RUN chmod a+x /usr/local/bin/xdebug-on && \
RUN chmod -R a+rwx /usr/local/etc/php/conf.d
# Use our own ini configuration file to set up some PHP default.
COPY ./php.ini /usr/local/etc/php/conf.d/999-slic.ini

# Install and make wp-cli binary available and executable by all users.
ADD https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar /usr/local/bin/wp
RUN chmod a+rx /usr/local/bin/wp

# If PHP_VERSION is 7.4, the use wp-cli to update wordpress to version 6.2.
# No image is available for wordpress 6.2 with PHP 7.4: this works around the issue.
RUN if [ "${PHP_VERSION}" = "7.4" ]; then \
wp core update --version=6.2 --force; \
fi

0 comments on commit dccaf1e

Please sign in to comment.