From 3879067d9bf93ccb722625f3f712b4efef40355e Mon Sep 17 00:00:00 2001 From: "info@pi-farm.de" <6+pi-farm@noreply.git.pi-farm.de> Date: Wed, 7 Oct 2026 13:04:47 +0000 Subject: [PATCH] .gitea/workflows/build-and-push.yaml aktualisiert --- .gitea/workflows/build-and-push.yaml | 36 ++++++++++++++++------------ 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/build-and-push.yaml b/.gitea/workflows/build-and-push.yaml index fcf5ff6..32d1e8d 100644 --- a/.gitea/workflows/build-and-push.yaml +++ b/.gitea/workflows/build-and-push.yaml @@ -319,21 +319,27 @@ jobs: } > docker_run_block.txt DOCKERHUB_LINK_CONTENT="" - if [[ "${{ steps.prep.outputs.push_targets }}" == *"dockerhub"* ]]; then - DH_USER="${{ secrets.DOCKERHUB_USERNAME }}" - DOCKERHUB_LINK_CONTENT="[![Docker Hub](https://img.shields.io/badge/docker-hub-blue?logo=docker&logoColor=white)](https://hub.docker.com/r/${DH_USER}/${REPO_PURE})" - fi - - process_template() { - local template=$1; local output=$2 - [ ! -f "$template" ] && return - cp "$template" "$output" - - export REPO_PURE FULL_URL BUILD_TAG BASE_IMAGE ARM_STATUS CURRENT_TIME \ - HISTORY_CONTENT DOCKERHUB_LINK_CONTENT ENV_BLOCK_CONTENT \ - PORTS_BLOCK_CONTENT VOL_BLOCK_CONTENT DESCRIPTION - - python3 -c ' + if [[ "${{ steps.prep.outputs.push_targets }}" == *"dockerhub"* ]]; then + DH_USER="${{ secrets.DOCKERHUB_USERNAME }}" + DOCKERHUB_LINK_CONTENT="[![Docker Hub](https://img.shields.io/badge/docker-hub-blue?logo=docker&logoColor=white)](https://hub.docker.com/r/${DH_USER}/${REPO_PURE})" + fi + + # Stelle sicher, dass python3 vorhanden ist + if ! command -v python3 &> /dev/null; then + echo "📦 python3 fehlt und wird installiert..." + (apt-get update && apt-get install -y python3) || (apk add --no-cache python3) || true + fi + + process_template() { + local template=$1; local output=$2 + [ ! -f "$template" ] && return + cp "$template" "$output" + + export REPO_PURE FULL_URL BUILD_TAG BASE_IMAGE ARM_STATUS CURRENT_TIME \ + HISTORY_CONTENT DOCKERHUB_LINK_CONTENT ENV_BLOCK_CONTENT \ + PORTS_BLOCK_CONTENT VOL_BLOCK_CONTENT DESCRIPTION + + python3 -c ' import os, sys output = sys.argv[1]