Skip to content

Commit b4a1611

Browse files
committed
build: 🔧 fix PHP version retrieval in CI workflow
* Updated the method for retrieving the PHP version in the CI workflow. * Changed from using 'PHP_VERSION=' to 'ARG PHP_VERSION=' for better accuracy.
1 parent 2cca560 commit b4a1611

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
if [[ -n "${{ github.event.inputs.version }}" ]]; then
5858
export PHPVERSION="${{ github.event.inputs.version }}"
5959
else
60-
export PHPVERSION=$(grep 'PHP_VERSION=' Dockerfile | cut -d'=' -f2)
60+
export PHPVERSION=$(grep -m1 '^ARG PHP_VERSION=' Dockerfile | cut -d'=' -f2)
6161
fi
6262
echo "full_version=${PHPVERSION}" >> $GITHUB_OUTPUT
6363
echo "mino_version=${PHPVERSION%.*}" >> $GITHUB_OUTPUT

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
ARG PHP_VERSION=8.5.4 \
2-
ALPINE_VERSION
1+
ARG PHP_VERSION=8.5.4
2+
ARG ALPINE_VERSION
33

44
FROM php:${PHP_VERSION}-fpm-alpine
5+
ARG PHP_VERSION
6+
ARG ALPINE_VERSION
57
LABEL maintainer="Milos Svasek <[email protected]>" \
68
alpine.version="${ALPINE_VERSION}" \
79
php.version="${PHP_VERSION}"

0 commit comments

Comments
 (0)