diff --git a/.woodpecker.yml b/.woodpecker.yml index d54a31b..5a87a4d 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -20,7 +20,8 @@ steps: # Discord Benachrichtigung mit jq (sicher gegen Sonderzeichen) if [ ! -z "$DISCORD_WEBHOOK" ]; then - PAYLOAD=$(printf '%s' "${CI_COMMIT_MESSAGE:-No commit message}" | jq -Rs \ + echo "${CI_COMMIT_MESSAGE:-No commit message}" > /tmp/commit_msg.txt + PAYLOAD=$(cat /tmp/commit_msg.txt | jq -Rs \ --arg title "⚠️ npm audit Warnung - Build #${CI_BUILD_NUMBER}" \ --arg repo "${CI_REPO}" \ --arg branch "${CI_COMMIT_BRANCH}" \ @@ -45,6 +46,7 @@ steps: timestamp: $timestamp }] }') + rm -f /tmp/commit_msg.txt curl -H "Content-Type: application/json" -X POST \ -d "$PAYLOAD" "$DISCORD_WEBHOOK" @@ -82,7 +84,8 @@ steps: - apt-get update && apt-get install -y jq - | if [ ! -z "$DISCORD_WEBHOOK" ]; then - PAYLOAD=$(printf '%s' "${CI_COMMIT_MESSAGE:-No commit message}" | jq -Rs \ + echo "${CI_COMMIT_MESSAGE:-No commit message}" > /tmp/commit_msg.txt + PAYLOAD=$(cat /tmp/commit_msg.txt | jq -Rs \ --arg title "✅ Build #${CI_BUILD_NUMBER} - Success" \ --arg repo "${CI_REPO}" \ --arg branch "${CI_COMMIT_BRANCH}" \ @@ -104,6 +107,7 @@ steps: timestamp: $timestamp }] }') + rm -f /tmp/commit_msg.txt curl -H "Content-Type: application/json" -X POST \ -d "$PAYLOAD" "$DISCORD_WEBHOOK" @@ -122,7 +126,8 @@ steps: - apt-get update && apt-get install -y jq - | if [ ! -z "$DISCORD_WEBHOOK" ]; then - PAYLOAD=$(printf '%s' "${CI_COMMIT_MESSAGE:-No commit message}" | jq -Rs \ + echo "${CI_COMMIT_MESSAGE:-No commit message}" > /tmp/commit_msg.txt + PAYLOAD=$(cat /tmp/commit_msg.txt | jq -Rs \ --arg title "❌ Build #${CI_BUILD_NUMBER} - Failure" \ --arg repo "${CI_REPO}" \ --arg branch "${CI_COMMIT_BRANCH}" \ @@ -144,6 +149,7 @@ steps: timestamp: $timestamp }] }') + rm -f /tmp/commit_msg.txt curl -H "Content-Type: application/json" -X POST \ -d "$PAYLOAD" "$DISCORD_WEBHOOK"