Skip to content

Commit 2cca560

Browse files
committed
build: 🚀 update PHP version to 8.5.4 and add Alpine version retrieval
* Updated the PHP version to 8.5.4 in the Dockerfile. * Added a step in the CI workflow to retrieve the Alpine version from the base image. * This ensures that the Alpine version is correctly set as a build argument for the Docker image.
1 parent 6d11621 commit 2cca560

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ jobs:
6363
echo "mino_version=${PHPVERSION%.*}" >> $GITHUB_OUTPUT
6464
echo "majo_version=${PHPVERSION%%.*}" >> $GITHUB_OUTPUT
6565
66+
# Get the Alpine version from the base image
67+
- name: Get the Alpine version
68+
id: alpine
69+
run: |
70+
ALPINE_VERSION=$(docker run --rm php:${{ steps.php.outputs.full_version }}-fpm-alpine cat /etc/alpine-release)
71+
echo "version=${ALPINE_VERSION}" >> $GITHUB_OUTPUT
72+
6673
# Prepare Docker tags
6774
# https://github.com/docker/metadata-action
6875
- name: Docker meta
@@ -85,5 +92,7 @@ jobs:
8592
with:
8693
context: .
8794
push: ${{ github.event_name != 'pull_request' }}
88-
build-args: PHP_VERSION=${{ steps.php.outputs.full_version }}
95+
build-args: |
96+
PHP_VERSION=${{ steps.php.outputs.full_version }}
97+
ALPINE_VERSION=${{ steps.alpine.outputs.version }}
8998
tags: ${{ steps.meta.outputs.tags }}

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
ARG PHP_VERSION=8.5.3
1+
ARG PHP_VERSION=8.5.4 \
2+
ALPINE_VERSION
23

34
FROM php:${PHP_VERSION}-fpm-alpine
45
LABEL maintainer="Milos Svasek <[email protected]>" \

0 commit comments

Comments
 (0)