From cb8909d120f7c1280bad4241b142ed976ace2c01 Mon Sep 17 00:00:00 2001 From: "info@pi-farm.de" <6+pi-farm@noreply.git.pi-farm.de> Date: Wed, 28 Oct 2026 14:37:03 +0000 Subject: [PATCH] fix template-path --- .gitea/workflows/build-and-push.yaml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/build-and-push.yaml b/.gitea/workflows/build-and-push.yaml index 11e2880..65a565d 100644 --- a/.gitea/workflows/build-and-push.yaml +++ b/.gitea/workflows/build-and-push.yaml @@ -235,21 +235,21 @@ jobs: RAW_COMMIT_MSG="${{ gitea.event.head_commit.message }}" COMMIT_MSG=$(echo "$RAW_COMMIT_MSG" | sed 's/\[skip ci\]//g' | tr -d '\r\n' | xargs) - TOKEN="${{ secrets.RUNNER_TOKEN }}" - curl -sSLf -H "Authorization: token $TOKEN" \ - "https://git.pi-farm.de/pi-farm/templates/raw/branch/main/README.template" \ - -o README.template || echo "Warnung: README Template konnte nicht geladen werden" + # Lokale Templates an die vom Skript erwartete Stelle kopieren + if [ -f ".gitea/docker-compose.template" ]; then + cp .gitea/docker-compose.template docker-compose.template + elif [ -f "docker-compose.template" ]; then + echo "Using local docker-compose.template" + else + echo "❌ FEHLER: docker-compose.template nicht gefunden!" + exit 1 + fi - curl -sSLf -H "Authorization: token $TOKEN" \ - "https://git.pi-farm.de/pi-farm/templates/raw/branch/main/docker-compose.template" \ - -o docker-compose.template || echo "Warnung: Compose Template konnte nicht geladen werden" - - for t_file in README.template docker-compose.template; do - if [ -f "$t_file" ] && grep -qi "" "$t_file"; then - echo "❌ FEHLER: $t_file ist eine HTML-Loginseite! Download verworfen." - rm -f "$t_file" - fi - done + if [ -f ".gitea/README.template" ]; then + cp .gitea/README.template README.template + elif [ -f "README.template" ]; then + echo "Using local README.template" + fi NEW_ROW="| **$BUILD_TAG** | $CURRENT_TIME | $COMMIT_MSG ✅ |" if [ -f "VERSION.history" ]; then