Skip to content

refactor: 移除群组通知,由 Skills 脚本统一发送 #44

refactor: 移除群组通知,由 Skills 脚本统一发送

refactor: 移除群组通知,由 Skills 脚本统一发送 #44

Workflow file for this run

name: Notify Telegram on GitHub Push
description: 'Send notifications to Telegram channel only (groups are notified by Skills script)'
on:
push:
branches:
- main
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Send to channel
env:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
CHANNEL_ID: ${{ secrets.TELEGRAM_CHANNEL_ID }}
run: |
if [ -n "$CHANNEL_ID" ]; then
TEXT=$'📦 新增资源推送\n\n${{ github.event.head_commit.message }}\n\n🔗 资料总站:https://doc.869hr.uk\n📂 GitHub:${{ github.event.head_commit.url }}'
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \
-d chat_id="$CHANNEL_ID" \
--data-urlencode "text=${TEXT}"
fi