add Description and Docker Compose Block to Readme.md
Some checks failed
/ release-and-build (push) Failing after 18s

This commit is contained in:
2026-02-13 17:50:22 +01:00
parent 3773902aba
commit d5cb7e36df
2 changed files with 15 additions and 4 deletions

View File

@@ -311,7 +311,7 @@ jobs:
RUN_CMD="${RUN_CMD} \\ \n ${FULL_URL}:${BUILD_TAG}"
DOCKER_RUN_FINAL=$(echo -e "$RUN_CMD")
# TEMPLATE ENGINE
# --- TEMPLATE ENGINE (KORRIGIERT & ERWEITERT) ---
process_template() {
local template=$1; local output=$2
if [ -f "$template" ]; then
@@ -327,7 +327,10 @@ jobs:
line="${line//__HISTORY_CONTENT__/$HISTORY_CONTENT}"
line="${line//__DOCKER_RUN__/$DOCKER_RUN_FINAL}"
# 2. Block Injection (Jetzt sicher gegen Abstürze bei leeren Variablen)
# NEU: Description (mit Fallback, falls die Variable mal fehlt)
line="${line//__DESCRIPTION__/${DESCRIPTION:-Keine Beschreibung angegeben.}}"
# 2. Block Injection
if [[ "$line" == *"__ENV_BLOCK__"* ]]; then
if [ -n "$ENV_BLOCK_CONTENT" ]; then
echo -e "${ENV_BLOCK_CONTENT}" >> "$output"
@@ -340,6 +343,11 @@ jobs:
if [ -n "$VOL_BLOCK_CONTENT" ]; then
echo -e "${VOL_BLOCK_CONTENT}" >> "$output"
fi
# NEU: Compose Block Injection
elif [[ "$line" == *"__COMPOSE_BLOCK__"* ]]; then
if [ -f "docker-compose.yml" ]; then
cat docker-compose.yml >> "$output"
fi
else
# Wenn kein Block-Platzhalter, schreibe die normale Zeile
echo "$line" >> "$output"
@@ -348,8 +356,10 @@ jobs:
fi
}
process_template "README.template" "README.md"
# WICHTIG: Zuerst Compose generieren, dann README!
# Nur so können wir die fertige Compose-Datei in die README einfügen.
process_template "docker-compose.template" "docker-compose.yml"
process_template "README.template" "README.md"
echo "FINAL_MSG=$COMMIT_MSG" >> $GITHUB_ENV

View File

@@ -19,3 +19,4 @@ ENV_PGID=1000
# VOL_CONFIG=./config:/config
# VOL_DATA=./data:/data
# PORT_WEB=8080:80
DESCRIPTION="Dies ist ein Alpine-basiertes Base-Image für meine Pi-Farm."