fix handling docker-compose.template
All checks were successful
/ release-and-build (push) Successful in 34s

This commit is contained in:
2026-02-13 00:57:07 +01:00
parent c3440f6dcf
commit c88d870b86

View File

@@ -258,8 +258,9 @@ jobs:
# 1. Environment Block
ENV_BLOCK_CONTENT=""
env_vars=$(grep '^ENV_' buildargs.env | grep -v '^#' | tr -d '\r')
env_vars=$(grep '^ENV_' buildargs.env | grep -v '^#' | tr -d '\r' || true)
if [ ! -z "$env_vars" ]; then
ENV_BLOCK_CONTENT=" environment:\\n" # Header nur wenn Variablen da sind
for line in $env_vars; do
key=$(echo "$line" | cut -d'=' -f1)
val="${!key}"
@@ -270,7 +271,7 @@ jobs:
# 2. Ports Block
PORTS_BLOCK_CONTENT=""
port_vars=$(grep '^PORT_' buildargs.env | grep -v '^#' | tr -d '\r')
port_vars=$(grep '^PORT_' buildargs.env | grep -v '^#' | tr -d '\r' || true)
if [ ! -z "$port_vars" ]; then
PORTS_BLOCK_CONTENT=" ports:\\n"
for line in $port_vars; do
@@ -282,7 +283,7 @@ jobs:
# 3. Volumes Block
VOL_BLOCK_CONTENT=""
vol_vars=$(grep '^VOL_' buildargs.env | grep -v '^#' | tr -d '\r')
vol_vars=$(grep '^VOL_' buildargs.env | grep -v '^#' | tr -d '\r' || true)
if [ ! -z "$vol_vars" ]; then
VOL_BLOCK_CONTENT=" volumes:\\n"
for line in $vol_vars; do