Skip to content

Commit 79e998e

Browse files
committed
feat: create matrix by minor version
1 parent 3a46892 commit 79e998e

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989

9090
- uses: docker/build-push-action@v5
9191
with:
92-
tags: quay.io/friendsofshopware/devcontainer:${{ matrix.swVersion }}-${{ matrix.phpVersion }}
92+
tags: quay.io/friendsofshopware/devcontainer:${{ matrix.tag }}-${{ matrix.phpVersion }}
9393
platforms: linux/amd64,linux/arm64
9494
file: Dockerfile
9595
build-args: |

Dockerfile.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
php-${PHP_VERSION}-opcache \
5656
php-${PHP_VERSION}-zstd \
5757
php-${PHP_VERSION}-redis \
58-
php-${PHP_VERSION}-imagick \
5958
openssl-config \
6059
mariadb-11.2 \
6160
jq

matrix.mjs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
const swToPHP = await (await fetch('https://raw.githubusercontent.com/FriendsOfShopware/shopware-static-data/main/data/all-supported-php-versions-by-shopware-version.json')).json();
22

33
const matrix = [];
4+
const alreadyAddedVersion = new Set();
45

5-
for (const swVersion of Object.keys(swToPHP)) {
6+
for (const swVersion of Object.keys(swToPHP).reverse()) {
67
if (swVersion.indexOf('6.6') !== 0 || swVersion.indexOf('RC') !== -1) {
78
continue;
89
}
910

11+
const patchVersion = swVersion.split('.').slice(0, 3).join('.')
12+
13+
if (alreadyAddedVersion.has(patchVersion)) {
14+
continue;
15+
}
16+
17+
alreadyAddedVersion.add(patchVersion);
18+
1019
for (const phpVersion of swToPHP[swVersion]) {
1120
matrix.push({
21+
tag: patchVersion,
1222
swVersion,
1323
phpVersion,
1424
});

0 commit comments

Comments
 (0)