File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 1313 contents : read
1414 packages : write
1515
16+ strategy :
17+ matrix :
18+ php : ["8.2", "8.3"]
19+ composer : ["2.2", "2"]
20+ fail-fast : false
21+
1622 steps :
1723 - name : Checkout code
1824 uses : actions/checkout@v4
@@ -27,17 +33,14 @@ jobs:
2733 username : ${{ github.actor }}
2834 password : ${{ secrets.GITHUB_TOKEN }}
2935
30- - name : Extract versions
31- id : vars
32- run : |
33- php=$(grep 'ARG PHP_VERSION' Dockerfile | cut -d= -f2)
34- composer=$(grep 'ARG COMPOSER_VERSION' Dockerfile | cut -d= -f2)
35- echo "tag=$php-$composer" >> $GITHUB_OUTPUT
36-
3736 - name : Build and push multi-arch image
3837 uses : docker/build-push-action@v6
3938 with :
4039 context : .
4140 push : true
4241 platforms : linux/amd64,linux/arm64
43- tags : ghcr.io/${{ github.repository }}:${{ steps.vars.outputs.tag }}
42+ build-args : |
43+ PHP_VERSION=${{ matrix.php }}
44+ COMPOSER_VERSION=${{ matrix.composer }}
45+ tags : |
46+ ghcr.io/${{ github.repository }}:${{ matrix.php }}-${{ matrix.composer }}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ FROM ubuntu:22.04
33ARG DEBIAN_FRONTEND=noninteractive
44
55# Allow PHP version and composer version to be overriden
6- ARG PHP_VERSION=8.2.29
6+ ARG PHP_VERSION=8.2
77ARG COMPOSER_VERSION=2.2
88
99ENV LANG=en_US.UTF-8 \
You can’t perform that action at this time.
0 commit comments