6
6
glpi-version :
7
7
required : true
8
8
type : string
9
+ complete-matrix :
10
+ required : false
11
+ type : boolean
12
+ default : false
9
13
outputs :
10
14
matrix :
11
15
value : ${{ jobs.generate-ci-matrix.outputs.matrix }}
@@ -21,31 +25,53 @@ jobs:
21
25
id : " generate-ci-matrix"
22
26
run : |
23
27
if [[ "${{ inputs.glpi-version }}" = "10.0.x" ]]; then
24
- MATRIX='
25
- {
26
- "include": [
27
- {"glpi-version": "10.0.x", "php-version": "7.4", "db-image": "mysql:8.0"},
28
- {"glpi-version": "10.0.x", "php-version": "8.0", "db-image": "mysql:8.0"},
29
- {"glpi-version": "10.0.x", "php-version": "8.1", "db-image": "mysql:8.0"},
30
- {"glpi-version": "10.0.x", "php-version": "8.2", "db-image": "mysql:8.0"},
31
- {"glpi-version": "10.0.x", "php-version": "8.3", "db-image": "mysql:8.0"},
32
- {"glpi-version": "10.0.x", "php-version": "8.3", "db-image": "mysql:5.7"},
33
- {"glpi-version": "10.0.x", "php-version": "8.3", "db-image": "mariadb:10.2"},
34
- {"glpi-version": "10.0.x", "php-version": "8.3", "db-image": "mariadb:10.11"}
35
- ]
36
- }
37
- '
28
+ if [[ "${{ inputs.complete-matrix && 'true' || 'false' }}" = "true" ]]; then
29
+ MATRIX='
30
+ {
31
+ "include": [
32
+ {"glpi-version": "10.0.x", "php-version": "7.4", "db-image": "mysql:8.0"},
33
+ {"glpi-version": "10.0.x", "php-version": "8.0", "db-image": "mysql:8.0"},
34
+ {"glpi-version": "10.0.x", "php-version": "8.1", "db-image": "mysql:8.0"},
35
+ {"glpi-version": "10.0.x", "php-version": "8.2", "db-image": "mysql:8.0"},
36
+ {"glpi-version": "10.0.x", "php-version": "8.3", "db-image": "mysql:8.0"},
37
+ {"glpi-version": "10.0.x", "php-version": "8.3", "db-image": "mysql:5.7"},
38
+ {"glpi-version": "10.0.x", "php-version": "8.3", "db-image": "mariadb:10.2"},
39
+ {"glpi-version": "10.0.x", "php-version": "8.3", "db-image": "mariadb:10.11"}
40
+ ]
41
+ }
42
+ '
43
+ else
44
+ MATRIX='
45
+ {
46
+ "include": [
47
+ {"glpi-version": "10.0.x", "php-version": "7.4", "db-image": "mariadb:10.2"},
48
+ {"glpi-version": "10.0.x", "php-version": "8.3", "db-image": "mariadb:10.11"}
49
+ ]
50
+ }
51
+ '
52
+ fi
38
53
elif [[ "${{ inputs.glpi-version }}" = "10.1.x" ]]; then
39
- MATRIX='
40
- {
41
- "include": [
42
- {"glpi-version": "10.1.x", "php-version": "8.1", "db-image": "mysql:8.0"},
43
- {"glpi-version": "10.1.x", "php-version": "8.2", "db-image": "mysql:8.0"},
44
- {"glpi-version": "10.1.x", "php-version": "8.3", "db-image": "mysql:8.0"},
45
- {"glpi-version": "10.1.x", "php-version": "8.3", "db-image": "mariadb:10.5"},
46
- {"glpi-version": "10.1.x", "php-version": "8.3", "db-image": "mariadb:10.11"}
47
- ]
48
- }
49
- '
54
+ if [[ "${{ inputs.complete-matrix && 'true' || 'false' }}" = "true" ]]; then
55
+ MATRIX='
56
+ {
57
+ "include": [
58
+ {"glpi-version": "10.1.x", "php-version": "8.1", "db-image": "mysql:8.0"},
59
+ {"glpi-version": "10.1.x", "php-version": "8.2", "db-image": "mysql:8.0"},
60
+ {"glpi-version": "10.1.x", "php-version": "8.3", "db-image": "mysql:8.0"},
61
+ {"glpi-version": "10.1.x", "php-version": "8.3", "db-image": "mariadb:10.5"},
62
+ {"glpi-version": "10.1.x", "php-version": "8.3", "db-image": "mariadb:10.11"}
63
+ ]
64
+ }
65
+ '
66
+ else
67
+ MATRIX='
68
+ {
69
+ "include": [
70
+ {"glpi-version": "10.0.x", "php-version": "8.1", "db-image": "mariadb:10.5"},
71
+ {"glpi-version": "10.0.x", "php-version": "8.3", "db-image": "mariadb:10.11"}
72
+ ]
73
+ }
74
+ '
75
+ fi
50
76
fi
51
77
echo "matrix=$(echo $MATRIX | jq -c .)" >> $GITHUB_OUTPUT
0 commit comments