From e6197c856912e0433b56538d08c2834adf07dc99 Mon Sep 17 00:00:00 2001 From: OG T Date: Tue, 24 Mar 2026 00:16:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E4=BD=BF=E7=94=A8=E6=AD=A3=E7=A2=BA?= =?UTF-8?q?=E7=9A=84=20Telegram=20secrets=20=E5=90=8D=E7=A8=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TELEGRAM_BOT_TOKEN → OPENCLAW_TG_BOT_TOKEN TELEGRAM_CHAT_ID → OPENCLAW_TG_CHAT_ID 這是已設定的 secrets 名稱,之前用錯名稱導致通知沒發出。 Co-Authored-By: Claude Opus 4.5 --- .github/workflows/cd.yaml | 8 ++++---- .github/workflows/deploy-prod.yml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 265182da..199f175b 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -105,15 +105,15 @@ jobs: - name: Notify Telegram on Success if: success() run: | - curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \ - -d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \ + curl -s -X POST "https://api.telegram.org/bot${{ secrets.OPENCLAW_TG_BOT_TOKEN }}/sendMessage" \ + -d chat_id="${{ secrets.OPENCLAW_TG_CHAT_ID }}" \ -d text="✅ *AWOOOI 部署成功*%0A%0ACommit: \`${{ github.sha }}\`%0ABranch: \`${{ github.ref_name }}\`%0AWorkflow: [查看](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" \ -d parse_mode="Markdown" - name: Notify Telegram on Failure if: failure() run: | - curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \ - -d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \ + curl -s -X POST "https://api.telegram.org/bot${{ secrets.OPENCLAW_TG_BOT_TOKEN }}/sendMessage" \ + -d chat_id="${{ secrets.OPENCLAW_TG_CHAT_ID }}" \ -d text="❌ *AWOOOI 部署失敗*%0A%0ACommit: \`${{ github.sha }}\`%0ABranch: \`${{ github.ref_name }}\`%0AWorkflow: [查看](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" \ -d parse_mode="Markdown" diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 5f670e90..4afc1664 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -304,9 +304,9 @@ jobs: # 發送 Telegram 訊息 (JSON payload with HTML + Inline Keyboard) # 鐵律: Token 必須用 Secrets,禁止硬編碼 - curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \ + curl -s -X POST "https://api.telegram.org/bot${{ secrets.OPENCLAW_TG_BOT_TOKEN }}/sendMessage" \ -H "Content-Type: application/json" \ - -d "{\"chat_id\":\"${{ secrets.TELEGRAM_CHAT_ID }}\",\"text\":\"${MESSAGE}\",\"parse_mode\":\"HTML\",\"reply_markup\":${KEYBOARD}}" + -d "{\"chat_id\":\"${{ secrets.OPENCLAW_TG_CHAT_ID }}\",\"text\":\"${MESSAGE}\",\"parse_mode\":\"HTML\",\"reply_markup\":${KEYBOARD}}" - name: Send OpenClaw Webhook if: always()