fix handling docker-compose.template
All checks were successful
/ release-and-build (push) Successful in 34s
All checks were successful
/ release-and-build (push) Successful in 34s
This commit is contained in:
@@ -258,8 +258,9 @@ jobs:
|
|||||||
|
|
||||||
# 1. Environment Block
|
# 1. Environment Block
|
||||||
ENV_BLOCK_CONTENT=""
|
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
|
if [ ! -z "$env_vars" ]; then
|
||||||
|
ENV_BLOCK_CONTENT=" environment:\\n" # Header nur wenn Variablen da sind
|
||||||
for line in $env_vars; do
|
for line in $env_vars; do
|
||||||
key=$(echo "$line" | cut -d'=' -f1)
|
key=$(echo "$line" | cut -d'=' -f1)
|
||||||
val="${!key}"
|
val="${!key}"
|
||||||
@@ -270,7 +271,7 @@ jobs:
|
|||||||
|
|
||||||
# 2. Ports Block
|
# 2. Ports Block
|
||||||
PORTS_BLOCK_CONTENT=""
|
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
|
if [ ! -z "$port_vars" ]; then
|
||||||
PORTS_BLOCK_CONTENT=" ports:\\n"
|
PORTS_BLOCK_CONTENT=" ports:\\n"
|
||||||
for line in $port_vars; do
|
for line in $port_vars; do
|
||||||
@@ -282,7 +283,7 @@ jobs:
|
|||||||
|
|
||||||
# 3. Volumes Block
|
# 3. Volumes Block
|
||||||
VOL_BLOCK_CONTENT=""
|
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
|
if [ ! -z "$vol_vars" ]; then
|
||||||
VOL_BLOCK_CONTENT=" volumes:\\n"
|
VOL_BLOCK_CONTENT=" volumes:\\n"
|
||||||
for line in $vol_vars; do
|
for line in $vol_vars; do
|
||||||
|
|||||||
Reference in New Issue
Block a user