-
Notifications
You must be signed in to change notification settings - Fork 6
99 lines (96 loc) · 4.99 KB
/
build-php-images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
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"]
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
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 }}
job_list: |
build%${{ needs.build.result }}