From 89ec11cc54921174925495c65d48ce8cb734b1db Mon Sep 17 00:00:00 2001 From: OG T Date: Fri, 10 Apr 2026 22:14:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(cd):=20=E7=A7=BB=E9=99=A4=20YAML=20?= =?UTF-8?q?=E4=B8=8D=E5=90=88=E6=B3=95=E7=9A=84=20Unicode=20=E6=A1=86?= =?UTF-8?q?=E7=B7=9A=E5=AD=97=E5=85=83=EF=BC=88=E2=94=9C=E2=94=94=EF=BC=89?= =?UTF-8?q?=E5=B0=8E=E8=87=B4=20workflow=20=E8=A7=A3=E6=9E=90=E5=A4=B1?= =?UTF-8?q?=E6=95=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Notify Pipeline Start/Failure 的 MSG 改為純 ASCII 格式。 此 bug 導致 e5f1541 之後所有 push 都無法觸發 CD。 Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/cd.yaml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/cd.yaml b/.gitea/workflows/cd.yaml index c92a23f9..bce27786 100644 --- a/.gitea/workflows/cd.yaml +++ b/.gitea/workflows/cd.yaml @@ -62,14 +62,10 @@ jobs: - name: Notify Pipeline Start run: | - MSG="🚀 AWOOOI 部署開始 -├ 📝 ${{ steps.commit.outputs.message }} -├ 🔖 ${{ steps.commit.outputs.short_sha }} -├ 👤 ${{ github.actor }} -└ 🌿 main" + MSG="AWOOOI Deploy Start | ${{ steps.commit.outputs.message }} | ${{ steps.commit.outputs.short_sha }} | ${{ github.actor }}" curl -fS -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \ -H "Content-Type: application/json" \ - -d "{\"chat_id\":\"${{ secrets.TELEGRAM_CHAT_ID }}\",\"parse_mode\":\"HTML\",\"text\":$(echo "$MSG" | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))')}" + -d "{\"chat_id\":\"${{ secrets.TELEGRAM_CHAT_ID }}\",\"text\":$(echo "$MSG" | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))')}" @@ -528,11 +524,7 @@ jobs: - name: Notify Pipeline Failure if: failure() run: | - MSG="❌ AWOOOI 部署失敗 -├ 📝 ${{ steps.commit.outputs.message }} -├ 🔖 ${{ steps.commit.outputs.short_sha }} -├ 👤 ${{ github.actor }} -└ 🔗 查看日誌: http://192.168.0.110:3001/wooo/awoooi/actions" + MSG="AWOOOI Deploy FAILED | ${{ steps.commit.outputs.message }} | ${{ steps.commit.outputs.short_sha }} | ${{ github.actor }} | http://192.168.0.110:3001/wooo/awoooi/actions" curl -fS -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \ -H "Content-Type: application/json" \ - -d "{\"chat_id\":\"${{ secrets.TELEGRAM_CHAT_ID }}\",\"parse_mode\":\"HTML\",\"text\":$(echo "$MSG" | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))')}" + -d "{\"chat_id\":\"${{ secrets.TELEGRAM_CHAT_ID }}\",\"text\":$(echo "$MSG" | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))')}"