合并 internal → main: 退款/提现/激活/CI 全面优化 #4

Open
shanshanzhong147 wants to merge 76 commits from internal into main
Showing only changes of commit c837999573 - Show all commits
+20 -20
View File
@@ -200,26 +200,26 @@ jobs:
TG_CHAT_ID: ${{ secrets.TG_CHAT_ID }}
run: |
if [ -z "${TG_BOT_TOKEN:-}" ] || [ -z "${TG_CHAT_ID:-}" ]; then
echo "Telegram secrets are not configured; skipping notification."
echo "Telegram 密钥未配置,跳过通知。"
exit 0
fi
MESSAGE="$(cat <<'EOF'
Staging deploy succeeded
Repository: ${{ github.repository }}
Branch: ${{ github.ref_name }}
Commit: ${{ github.sha }}
Actor: ${{ github.actor }}
Image: ${{ env.IMAGE_NAME }}:${{ github.sha }}
Updates:
测试环境发布成功
仓库:${{ github.repository }}
分支:${{ github.ref_name }}
提交:${{ github.sha }}
操作人:${{ github.actor }}
镜像:${{ env.IMAGE_NAME }}:${{ github.sha }}
本次更新:
${{ steps.release-notes.outputs.notes }}
Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
运行记录:${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
EOF
)"
curl -fsS -X POST "https://api.telegram.org/bot${TG_BOT_TOKEN}/sendMessage" \
--data-urlencode "chat_id=${TG_CHAT_ID}" \
--data-urlencode "text=${MESSAGE}" || echo "Telegram notification failed; deployment result is unchanged."
--data-urlencode "text=${MESSAGE}" || echo "Telegram 通知发送失败,但发布结果不受影响。"
- name: Notify Telegram on failure
if: failure()
@@ -228,23 +228,23 @@ jobs:
TG_CHAT_ID: ${{ secrets.TG_CHAT_ID }}
run: |
if [ -z "${TG_BOT_TOKEN:-}" ] || [ -z "${TG_CHAT_ID:-}" ]; then
echo "Telegram secrets are not configured; skipping notification."
echo "Telegram 密钥未配置,跳过通知。"
exit 0
fi
MESSAGE="$(cat <<'EOF'
Staging deploy failed
Repository: ${{ github.repository }}
Branch: ${{ github.ref_name }}
Commit: ${{ github.sha }}
Actor: ${{ github.actor }}
Image: ${{ env.IMAGE_NAME }}:${{ github.sha }}
Updates:
测试环境发布失败
仓库:${{ github.repository }}
分支:${{ github.ref_name }}
提交:${{ github.sha }}
操作人:${{ github.actor }}
镜像:${{ env.IMAGE_NAME }}:${{ github.sha }}
本次更新:
${{ steps.release-notes.outputs.notes }}
Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
运行记录:${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
EOF
)"
curl -fsS -X POST "https://api.telegram.org/bot${TG_BOT_TOKEN}/sendMessage" \
--data-urlencode "chat_id=${TG_CHAT_ID}" \
--data-urlencode "text=${MESSAGE}" || echo "Telegram notification failed; workflow failure was already recorded."
--data-urlencode "text=${MESSAGE}" || echo "Telegram 通知发送失败,工作流失败状态已记录。"