diff --git a/.gitea/workflows/docker.7.yaml b/.gitea/workflows/docker.7.yaml index 0f49dc8..a7f76e8 100644 --- a/.gitea/workflows/docker.7.yaml +++ b/.gitea/workflows/docker.7.yaml @@ -1,4 +1,4 @@ -name: release-tag +name: php-7 on: push diff --git a/.gitea/workflows/docker.8.yaml b/.gitea/workflows/docker.8.yaml index 6aba4e9..7ff8e66 100644 --- a/.gitea/workflows/docker.8.yaml +++ b/.gitea/workflows/docker.8.yaml @@ -1,4 +1,4 @@ -name: release-tag +name: php-8 on: push diff --git a/.gitea/workflows/docker.yaml b/.gitea/workflows/docker.yaml index e161f43..2936282 100644 --- a/.gitea/workflows/docker.yaml +++ b/.gitea/workflows/docker.yaml @@ -1,4 +1,4 @@ -name: release-tag +name: php-latestr on: push diff --git a/rootfs/root/docker/setup/06-post.sh b/rootfs/root/docker/setup/06-post.sh index 9d81745..ca35361 100755 --- a/rootfs/root/docker/setup/06-post.sh +++ b/rootfs/root/docker/setup/06-post.sh @@ -24,11 +24,19 @@ set -o pipefail # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set env variables exitCode=0 -if [ -d "/etc/php/php-fpm" ]; then rm -Rf "/etc/php/php-fpm"; fi -if [ -d "/etc/php/php-fpm.d" ]; then rm -Rf "/etc/php/php-fpm.d"; fi +php_ini=$(find /etc/php* -name 'php.ini' | grep -v '/etc/php$' | head -n1 | grep '^' || false) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Predifined actions - +if [ -d "/etc/php/php-fpm" ]; then rm -Rf "/etc/php/php-fpm"; fi +if [ -d "/etc/php/php-fpm.d" ]; then rm -Rf "/etc/php/php-fpm.d"; fi +if [ -n "$php_ini" ]; then + php_dir="$(dirname "$php_ini")" + if [ $php_dir != "/etc/php" ]; then + [ -L "/etc/php" ] || unlink /etc/php + ln -sf "$php_dir" /etc/php + [ -f "/etc/php.ini" ] && mv -f "/etc/php.ini" "/etc/php/php.ini" + fi +fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Main script diff --git a/tmp/etc/php/php.ini b/tmp/etc/php.ini similarity index 100% rename from tmp/etc/php/php.ini rename to tmp/etc/php.ini