.gitea/workflows/build-and-push.yaml aktualisiert
This commit is contained in:
1 parent
faec5655ff
commit
d194e1fa43
1 file changed
+20
-30
@@ -226,17 +226,7 @@ jobs:
|
||||
source ./cleaned_env.sh
|
||||
set +a
|
||||
|
||||
# WICHTIG: Nach dem Sourcing den dynamischen Tag (inkl. -dev falls dev-Branch) erzwingen!
|
||||
BUILD_TAG="${{ steps.prep.outputs.docker_tag }}"
|
||||
|
||||
if [ -f "Dockerfile.aarch64" ]; then ARM_STATUS="✅ Active"; else ARM_STATUS="❌ Not supported"; fi
|
||||
|
||||
RAW_COMMIT_MSG="${{ gitea.event.head_commit.message }}"
|
||||
COMMIT_MSG=$(echo "$RAW_COMMIT_MSG" | sed 's/\[skip ci\]//g' | tr -d '\r\n' | xargs)
|
||||
|
||||
# ... (restlicher Skriptverlauf bleibt unverändert)
|
||||
|
||||
# WICHTIG: Nach dem Sourcing den dynamischen Tag (inkl. -dev falls dev-Branch) erzwingen!
|
||||
# Nach dem Sourcing den dynamischen Tag (inkl. -dev falls dev-Branch) erzwingen
|
||||
BUILD_TAG="${{ steps.prep.outputs.docker_tag }}"
|
||||
|
||||
if [ -f "Dockerfile.aarch64" ]; then ARM_STATUS="✅ Active"; else ARM_STATUS="❌ Not supported"; fi
|
||||
@@ -347,37 +337,37 @@ jobs:
|
||||
PORTS_BLOCK_CONTENT VOL_BLOCK_CONTENT DESCRIPTION
|
||||
|
||||
python3 -c '
|
||||
import os, sys
|
||||
import os, sys
|
||||
|
||||
output = sys.argv[1]
|
||||
output = sys.argv[1]
|
||||
|
||||
with open(output, "r", encoding="utf-8") as f:
|
||||
with open(output, "r", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
|
||||
content = content.replace("__REPO_NAME__", os.environ.get("REPO_PURE", ""))
|
||||
content = content.replace("__FULL_URL__", os.environ.get("FULL_URL", ""))
|
||||
content = content.replace("__BUILD_TAG__", os.environ.get("BUILD_TAG", ""))
|
||||
content = content.replace("__BASE_IMAGE__", os.environ.get("BASE_IMAGE", ""))
|
||||
content = content.replace("__ARM_STATUS__", os.environ.get("ARM_STATUS", ""))
|
||||
content = content.replace("__CURRENT_DATE__", os.environ.get("CURRENT_TIME", ""))
|
||||
content = content.replace("__HISTORY_CONTENT__", os.environ.get("HISTORY_CONTENT", ""))
|
||||
content = content.replace("__DOCKERHUB_LINK__", os.environ.get("DOCKERHUB_LINK_CONTENT", ""))
|
||||
content = content.replace("__ENV_BLOCK__", os.environ.get("ENV_BLOCK_CONTENT", "").replace("\\n", "\n"))
|
||||
content = content.replace("__PORTS_BLOCK__", os.environ.get("PORTS_BLOCK_CONTENT", "").replace("\\n", "\n"))
|
||||
content = content.replace("__VOL_BLOCK__", os.environ.get("VOL_BLOCK_CONTENT", "").replace("\\n", "\n"))
|
||||
content = content.replace("__DESCRIPTION__", os.environ.get("DESCRIPTION", "Keine Beschreibung."))
|
||||
content = content.replace("__REPO_NAME__", os.environ.get("REPO_PURE", ""))
|
||||
content = content.replace("__FULL_URL__", os.environ.get("FULL_URL", ""))
|
||||
content = content.replace("__BUILD_TAG__", os.environ.get("BUILD_TAG", ""))
|
||||
content = content.replace("__BASE_IMAGE__", os.environ.get("BASE_IMAGE", ""))
|
||||
content = content.replace("__ARM_STATUS__", os.environ.get("ARM_STATUS", ""))
|
||||
content = content.replace("__CURRENT_DATE__", os.environ.get("CURRENT_TIME", ""))
|
||||
content = content.replace("__HISTORY_CONTENT__", os.environ.get("HISTORY_CONTENT", ""))
|
||||
content = content.replace("__DOCKERHUB_LINK__", os.environ.get("DOCKERHUB_LINK_CONTENT", ""))
|
||||
content = content.replace("__ENV_BLOCK__", os.environ.get("ENV_BLOCK_CONTENT", "").replace("\\n", "\n"))
|
||||
content = content.replace("__PORTS_BLOCK__", os.environ.get("PORTS_BLOCK_CONTENT", "").replace("\\n", "\n"))
|
||||
content = content.replace("__VOL_BLOCK__", os.environ.get("VOL_BLOCK_CONTENT", "").replace("\\n", "\n"))
|
||||
content = content.replace("__DESCRIPTION__", os.environ.get("DESCRIPTION", "Keine Beschreibung."))
|
||||
|
||||
if "__DOCKER_RUN__" in content and os.path.exists("docker_run_block.txt"):
|
||||
if "__DOCKER_RUN__" in content and os.path.exists("docker_run_block.txt"):
|
||||
with open("docker_run_block.txt", "r", encoding="utf-8") as f:
|
||||
content = content.replace("__DOCKER_RUN__", f.read())
|
||||
|
||||
if "__COMPOSE_BLOCK__" in content and os.path.exists("docker-compose.yml"):
|
||||
if "__COMPOSE_BLOCK__" in content and os.path.exists("docker-compose.yml"):
|
||||
with open("docker-compose.yml", "r", encoding="utf-8") as f:
|
||||
content = content.replace("__COMPOSE_BLOCK__", f.read())
|
||||
|
||||
with open(output, "w", encoding="utf-8") as f:
|
||||
with open(output, "w", encoding="utf-8") as f:
|
||||
f.write(content)
|
||||
' "$output"
|
||||
' "$output"
|
||||
}
|
||||
|
||||
process_template "docker-compose.template" "docker-compose.yml"
|
||||
|
||||
Reference in new issue
Block a user