Build php images and push to Docker Hub #194
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build php images and push to Docker Hub | |
on: | |
schedule: | |
- cron: '0 0 * * 0' | |
push: | |
branches: | |
- master | |
paths: | |
- 'php/**' | |
- '.github/workflows/build-php-images.yml' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
docker_hub_user: ${{ secrets.DOCKER_HUB_USER }} | |
strategy: | |
fail-fast: false | |
matrix: | |
php_version: ["7.4", "8.0", "8.1", "8.2", "8.3", "8.4-rc"] | |
include: | |
- php_version: 7.4 | |
RUNTIME_PACKAGE_DEPS: "msmtp libfreetype6 libjpeg62-turbo unzip git default-mysql-client sudo rsync liblz4-tool libzip-dev bc iproute2 libmemcached-dev libonig-dev openssh-client sshpass libgd3" | |
BUILD_PACKAGE_DEPS: "libcurl4-openssl-dev libjpeg-dev libpng-dev libxml2-dev" | |
PHP_EXT_DEPS: "zip bcmath soap pdo_mysql gd mysqli" | |
GD_CONFIG: "--with-jpeg=/usr/local/" | |
PECL_DEPS: "pecl install xdebug-3.1.3 memcached" | |
XDEBUG_INI: "xdebug3.ini" | |
COMPOSER_VERSION: 2 | |
- php_version: 8.0 | |
RUNTIME_PACKAGE_DEPS: "msmtp libfreetype6 libjpeg62-turbo libwebp6 unzip git default-mysql-client sudo rsync liblz4-tool libzip-dev bc iproute2 libmemcached-dev libonig-dev openssh-client sshpass libgd3" | |
BUILD_PACKAGE_DEPS: "libcurl4-openssl-dev libjpeg-dev libpng-dev libwebp-dev libxml2-dev" | |
PHP_EXT_DEPS: "zip bcmath soap pdo_mysql gd mysqli" | |
GD_CONFIG: "--with-jpeg=/usr/local/ --with-webp" | |
PECL_DEPS: "pecl install xdebug-3.1.3 memcached" | |
XDEBUG_INI: "xdebug3.ini" | |
COMPOSER_VERSION: 2 | |
- php_version: 8.1 | |
RUNTIME_PACKAGE_DEPS: "msmtp libfreetype6 libjpeg62-turbo libwebp-dev unzip git default-mysql-client sudo rsync liblz4-tool libzip-dev bc iproute2 libmemcached-dev libonig-dev openssh-client sshpass libssl-dev libgd3 libavif15" | |
BUILD_PACKAGE_DEPS: "libcurl4-openssl-dev libjpeg-dev libpng-dev libwebp-dev libxml2-dev libavif-dev" | |
PHP_EXT_DEPS: "zip bcmath soap pdo_mysql gd mysqli" | |
GD_CONFIG: "--with-jpeg=/usr/local/ --with-webp=/usr/local/ --with-avif" | |
PECL_DEPS: "pecl install xdebug memcached" | |
XDEBUG_INI: "xdebug3.ini" | |
COMPOSER_VERSION: 2 | |
- php_version: 8.2 | |
RUNTIME_PACKAGE_DEPS: "msmtp libfreetype6 libjpeg62-turbo libwebp-dev unzip git default-mysql-client sudo rsync liblz4-tool libzip-dev bc iproute2 libmemcached-dev libonig-dev openssh-client sshpass libssl-dev libgd3 libavif15" | |
BUILD_PACKAGE_DEPS: "libcurl4-openssl-dev libjpeg-dev libpng-dev libxml2-dev libavif-dev" | |
PHP_EXT_DEPS: "zip bcmath soap pdo_mysql gd mysqli" | |
GD_CONFIG: "--with-jpeg=/usr/local/ --with-webp=/usr/local/ --with-avif" | |
PECL_DEPS: "pecl install xdebug memcached" | |
XDEBUG_INI: "xdebug3.ini" | |
COMPOSER_VERSION: 2 | |
- php_version: 8.3 | |
RUNTIME_PACKAGE_DEPS: "msmtp libfreetype6 libjpeg62-turbo libwebp-dev unzip git default-mysql-client sudo rsync liblz4-tool libzip-dev bc iproute2 libmemcached-dev libonig-dev openssh-client sshpass libssl-dev libgd3 libavif15" | |
BUILD_PACKAGE_DEPS: "libcurl4-openssl-dev libjpeg-dev libpng-dev libxml2-dev libavif-dev" | |
PHP_EXT_DEPS: "zip bcmath soap pdo_mysql gd mysqli" | |
GD_CONFIG: "--with-jpeg=/usr/local/ --with-webp=/usr/local/ --with-avif" | |
PECL_DEPS: "pecl install xdebug memcached" | |
XDEBUG_INI: "xdebug3.ini" | |
COMPOSER_VERSION: 2 | |
- php_version: 8.4-rc | |
RUNTIME_PACKAGE_DEPS: "msmtp libfreetype6 libjpeg62-turbo libwebp-dev unzip git default-mysql-client sudo rsync liblz4-tool libzip-dev bc iproute2 libmemcached-dev libonig-dev openssh-client sshpass libssl-dev libgd3 libavif15" | |
BUILD_PACKAGE_DEPS: "libcurl4-openssl-dev libjpeg-dev libpng-dev libxml2-dev libavif-dev" | |
PHP_EXT_DEPS: "zip bcmath soap pdo_mysql gd mysqli" | |
GD_CONFIG: "--with-jpeg=/usr/local/ --with-webp=/usr/local/ --with-avif" | |
PECL_DEPS: "pecl install xdebug memcached" | |
XDEBUG_INI: "xdebug3.ini" | |
COMPOSER_VERSION: 2 | |
steps: | |
- name: build and push docker images | |
uses: 'OXID-eSales/github-actions/build_docker@v4' | |
with: | |
dockerhub_username: ${{ secrets.DOCKER_HUB_USER }} | |
dockerhub_password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
image_name: php | |
platforms: linux/amd64,linux/arm64 | |
build-args: | | |
PHP_VERSION=${{ matrix.php_version }} | |
RUNTIME_PACKAGE_DEPS=${{ matrix.RUNTIME_PACKAGE_DEPS }} | |
BUILD_PACKAGE_DEPS=${{ matrix.BUILD_PACKAGE_DEPS }} | |
PHP_EXT_DEPS=${{ matrix.PHP_EXT_DEPS }} | |
GD_CONFIG=${{ matrix.GD_CONFIG }} | |
PECL_DEPS=${{ matrix.PECL_DEPS }} | |
XDEBUG_INI=${{ matrix.XDEBUG_INI }} | |
COMPOSER_VERSION=${{ matrix.COMPOSER_VERSION }} | |
tags: | | |
oxidesales/oxideshop-docker-php:${{ matrix.php_version }} | |
finish: | |
if: always() | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
SLACK_WEBHOOK: "${{ secrets.SLACK_DEVOPS_WEBHOOK_URL }}" | |
steps: | |
- name: Send custom JSON data to Slack workflow | |
if: ${{ always() && env.SLACK_WEBHOOK != '' }} | |
uses: 'OXID-eSales/github-actions/slack_status@v4' | |
with: | |
slack_webhook: ${{ secrets.SLACK_DEVOPS_WEBHOOK_URL }} | |
title: '${{ github.workflow }} on ${{ github.repository }} by ${{ github.actor }}' | |
summary_list: | | |
Repository%${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
install_list: | | |
build%${{ needs.build.result }} |