.gitea/workflows/build-and-push.yaml aktualisiert
build-and-push.yaml / release-and-build (push) Failing after 22m23s

This commit is contained in:
pi-farm committed 2026-10-07 11:25:39 +00:00
1 parent d25f1697c5
commit a53403fbea
1 file changed
+10 -10
+10 -10
View File
@@ -220,12 +220,11 @@ jobs:
if [ -f "Dockerfile.aarch64" ]; then ARM_STATUS="✅ Active"; else ARM_STATUS="❌ Not supported"; fi
cat << 'EOF' > commit_msg.txt
${{ gitea.event.head_commit.message }}
EOF
COMMIT_MSG=$(sed 's/\[skip ci\]//g' commit_msg.txt | xargs)
# Commit-Message ohne fehleranfälliges Here-Doc einlesen
RAW_COMMIT_MSG="${{ gitea.event.head_commit.message }}"
COMMIT_MSG=$(echo "$RAW_COMMIT_MSG" | sed 's/\[skip ci\]//g' | tr -d '\r\n' | xargs)
# 1. Authentifizierter Download der Templates via curl (-f bricht bei HTTP-Fehlern ab)
# 1. Authentifizierter Download der Templates
TOKEN="${{ secrets.RUNNER_TOKEN }}"
curl -sSLf -H "Authorization: token $TOKEN" \
"https://git.pi-farm.de/pi-farm/templates/raw/branch/dev/README.template" \
@@ -235,7 +234,7 @@ jobs:
"https://git.pi-farm.de/pi-farm/templates/raw/branch/dev/docker-compose.template" \
-o docker-compose.template || echo "Warnung: Compose Template konnte nicht geladen werden"
# 2. Sicherheitsprüfung: Falls Gitea trotz -f eine HTML-Login-Seite ausgibt, Datei sofort verwerfen
# 2. Sicherheitsprüfung auf HTML-Login-Seite
for t_file in README.template docker-compose.template; do
if [ -f "$t_file" ] && grep -qi "<!DOCTYPE html>" "$t_file"; then
echo "❌ FEHLER: $t_file ist eine HTML-Loginseite! Download verworfen."
@@ -315,7 +314,6 @@ jobs:
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
# Template-Verarbeitung via Python (verhindert awk-Abstürze bei Zeilenumbrüchen)
process_template() {
local template=$1; local output=$2
[ ! -f "$template" ] && return
@@ -363,9 +361,11 @@ jobs:
process_template "README.template" "README.md"
echo "FINAL_MSG=$COMMIT_MSG" >> $GITHUB_ENV
echo "DESCRIPTION<<EOF" >> $GITHUB_ENV
echo -e "$DESCRIPTION" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
{
echo "DESCRIPTION<<EOF"
echo "$DESCRIPTION"
echo "EOF"
} >> $GITHUB_ENV
- name: Push README to Docker Hub
if: steps.check_changes.outputs.should_build == 'true' && contains(steps.prep.outputs.push_targets, 'dockerhub')