This repository has been archived by the owner on Oct 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
95 lines (91 loc) · 3.04 KB
/
main.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
name: Build and Publish
on:
workflow_dispatch:
push:
branches: [ master ]
schedule:
- cron: '4 2 * * *'
jobs:
build-and-push-docker-image:
name: Build Docker image and push to repositories
runs-on: ubuntu-latest
continue-on-error: true
strategy:
max-parallel: 10
matrix:
include:
- version: '8.3-rc'
tag: '8.3'
xdebug_ext: ''
xdebug_file: 'config/xdebug-blank.ini'
phpunit_ver: '8,9,10'
- version: '8.2'
xdebug_ext: 'xdebug-^3.2'
xdebug_file: 'config/xdebug3.ini'
phpunit_ver: '8,9,10'
- version: '8.1'
xdebug_ext: 'xdebug-^3.2'
xdebug_file: 'config/xdebug3.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '8,9,10'
- version: '8.0'
xdebug_ext: 'xdebug-^3.2'
xdebug_file: 'config/xdebug3.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '8,9'
- version: '7.4'
xdebug_ext: 'xdebug-^3.1'
xdebug_file: 'config/xdebug3.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '8,9'
- version: '7.3'
xdebug_ext: 'xdebug-^3.1'
xdebug_file: 'config/xdebug3.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '7,8,9'
- version: '7.2'
xdebug_ext: 'xdebug-^3.1'
xdebug_file: 'config/xdebug3.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '6,7,8'
- version: '7.1'
xdebug_ext: 'xdebug-^2.9'
xdebug_file: 'config/xdebug2.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '5,6,7'
- version: '7.0'
xdebug_ext: 'xdebug-^2.7'
xdebug_file: 'config/xdebug2.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '5,6'
use_archive: 1
- version: '5.6'
xdebug_ext: 'xdebug-^2.5'
xdebug_file: 'config/xdebug2.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '4,5'
use_archive: 1
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build image and push to Docker Hub and GitHub Container Registry
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
tags: gander/dev:${{ matrix.tag || matrix.version }}
push: true
build-args: |
PHP_VERSION=${{ matrix.version }}
XDEBUG_EXTENSION=${{ matrix.xdebug_ext }}
XDEBUG_FILE=${{ matrix.xdebug_file }}
PHP_EXTENSIONS_ADD=${{ matrix.extensions }}
PHPUNIT_VERSIONS=${{ matrix.phpunit_ver }}
USE_ARCHIVE=${{ matrix.use_archive || 0 }}