Skip to content

Commit 653ac3f

Browse files
Improve CI readability and consolidate PHP 8.5 tags (#8)
- Restructured matrix to use separate 'path' and 'tags' fields for better readability - Added comments to group PHP versions for easier navigation - Consolidated PHP 8.5 base variant to push both 'latest' and '8.5' tags in a single job - Removed unnecessary winterjung/split action dependency - Improved step formatting with consistent spacing - Reduced overall line length for better code review experience This reduces the number of jobs by consolidating the 8.5 variant that was previously split into 3 separate jobs (8.5:latest, 8.5:8.5, 8.5-ci:8.5-ci) into a more efficient structure where the base 8.5 image is built once and tagged with both 'latest' and '8.5'. Co-authored-by: Claude <noreply@anthropic.com>
1 parent df9f52f commit 653ac3f

1 file changed

Lines changed: 70 additions & 44 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 70 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,61 +13,87 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
path-and-tag:
17-
- '8.5:latest'
18-
- '8.5-ci:8.5-ci'
19-
- '8.5:8.5'
20-
- '8.5-frankenphp-alpine:8.5-frankenphp-alpine'
21-
- '8.5-frankenphp-bookworm:8.5-frankenphp-bookworm'
22-
- '8.5-symfony:8.5-symfony'
23-
- '8.4-ci:8.4-ci'
24-
- '8.4:8.4'
25-
- '8.4-frankenphp-alpine:8.4-frankenphp-alpine'
26-
- '8.4-frankenphp-bookworm:8.4-frankenphp-bookworm'
27-
- '8.4-symfony:8.4-symfony'
28-
- '8.3-ci:8.3-ci'
29-
- '8.3:8.3'
30-
- '8.3-frankenphp-alpine:8.3-frankenphp-alpine'
31-
- '8.3-frankenphp-bookworm:8.3-frankenphp-bookworm'
32-
- '8.3-symfony:8.3-symfony'
33-
- '8.2-ci:8.2-ci'
34-
- '8.2:8.2'
35-
- '8.2-frankenphp-alpine:8.2-frankenphp-alpine'
36-
- '8.2-frankenphp-bookworm:8.2-frankenphp-bookworm'
37-
- '8.2-symfony:8.2-symfony'
38-
- '8.1-ci:8.1-ci'
39-
- '8.1:8.1'
40-
- '8.1-symfony:8.1-symfony'
16+
include:
17+
# PHP 8.5 (latest)
18+
- path: "8.5"
19+
tags: |
20+
silarhi/php-apache:latest
21+
silarhi/php-apache:8.5
22+
- path: "8.5-ci"
23+
tags: silarhi/php-apache:8.5-ci
24+
- path: "8.5-frankenphp-alpine"
25+
tags: silarhi/php-apache:8.5-frankenphp-alpine
26+
- path: "8.5-frankenphp-bookworm"
27+
tags: silarhi/php-apache:8.5-frankenphp-bookworm
28+
- path: "8.5-symfony"
29+
tags: silarhi/php-apache:8.5-symfony
30+
31+
# PHP 8.4
32+
- path: "8.4"
33+
tags: silarhi/php-apache:8.4
34+
- path: "8.4-ci"
35+
tags: silarhi/php-apache:8.4-ci
36+
- path: "8.4-frankenphp-alpine"
37+
tags: silarhi/php-apache:8.4-frankenphp-alpine
38+
- path: "8.4-frankenphp-bookworm"
39+
tags: silarhi/php-apache:8.4-frankenphp-bookworm
40+
- path: "8.4-symfony"
41+
tags: silarhi/php-apache:8.4-symfony
42+
43+
# PHP 8.3
44+
- path: "8.3"
45+
tags: silarhi/php-apache:8.3
46+
- path: "8.3-ci"
47+
tags: silarhi/php-apache:8.3-ci
48+
- path: "8.3-frankenphp-alpine"
49+
tags: silarhi/php-apache:8.3-frankenphp-alpine
50+
- path: "8.3-frankenphp-bookworm"
51+
tags: silarhi/php-apache:8.3-frankenphp-bookworm
52+
- path: "8.3-symfony"
53+
tags: silarhi/php-apache:8.3-symfony
54+
55+
# PHP 8.2
56+
- path: "8.2"
57+
tags: silarhi/php-apache:8.2
58+
- path: "8.2-ci"
59+
tags: silarhi/php-apache:8.2-ci
60+
- path: "8.2-frankenphp-alpine"
61+
tags: silarhi/php-apache:8.2-frankenphp-alpine
62+
- path: "8.2-frankenphp-bookworm"
63+
tags: silarhi/php-apache:8.2-frankenphp-bookworm
64+
- path: "8.2-symfony"
65+
tags: silarhi/php-apache:8.2-symfony
66+
67+
# PHP 8.1
68+
- path: "8.1"
69+
tags: silarhi/php-apache:8.1
70+
- path: "8.1-ci"
71+
tags: silarhi/php-apache:8.1-ci
72+
- path: "8.1-symfony"
73+
tags: silarhi/php-apache:8.1-symfony
74+
4175
steps:
42-
-
43-
name: Prepare paths and tags
44-
uses: winterjung/split@v2
45-
id: split
46-
with:
47-
msg: ${{ matrix.path-and-tag }}
48-
separator: ':'
49-
-
50-
name: Checkout
76+
- name: Checkout
5177
uses: actions/checkout@v5
52-
-
53-
name: Set up QEMU
78+
79+
- name: Set up QEMU
5480
uses: docker/setup-qemu-action@v3
55-
-
56-
name: Set up Docker Buildx
81+
82+
- name: Set up Docker Buildx
5783
uses: docker/setup-buildx-action@v3
58-
-
59-
name: Login to DockerHub
84+
85+
- name: Login to DockerHub
6086
uses: docker/login-action@v3
6187
with:
6288
username: ${{ secrets.DOCKERHUB_USERNAME }}
6389
password: ${{ secrets.DOCKERHUB_TOKEN }}
64-
-
65-
name: Build and push
90+
91+
- name: Build and push
6692
uses: docker/build-push-action@v6
6793
with:
68-
context: ${{ steps.split.outputs._0 }}
94+
context: ${{ matrix.path }}
6995
platforms: linux/amd64,linux/arm64
70-
tags: ${{ format('silarhi/php-apache:{0}', steps.split.outputs._1) }}
96+
tags: ${{ matrix.tags }}
7197
push: true
7298
cache-from: type=gha
7399
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)