Skip to content

Commit 7131182

Browse files
committed
fix: 修复换行格式,简化群组通知内容
1 parent 37bef09 commit 7131182

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

.github/workflows/notify.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,20 @@ jobs:
1313
env:
1414
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
1515
run: |
16-
TEXT="📝 新增资源\n\n${{ github.event.head_commit.message }}\n\n🔗 超过100T资料总站网站:https://doc.869hr.uk\n📦 完整资源链接:https://t.me/dabaziyuan"
16+
TEXT=$'📝 资源更新\n\n请查看频道获取完整资源链接\n\n📦 https://t.me/dabaziyuan'
1717
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \
1818
-d chat_id="-1002573762160" \
1919
-d message_thread_id="5" \
20-
-d parse_mode="Markdown" \
2120
--data-urlencode "text=${TEXT}"
2221
2322
- name: Send notification to tgmShareAI group topic 2
2423
env:
2524
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
2625
run: |
27-
TEXT="📝 新增资源\n\n${{ github.event.head_commit.message }}\n\n🔗 超过100T资料总站网站:https://doc.869hr.uk\n📦 完整资源链接:https://t.me/dabaziyuan"
26+
TEXT=$'📝 资源更新\n\n请查看频道获取完整资源链接\n\n📦 https://t.me/dabaziyuan'
2827
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \
2928
-d chat_id="-1003365897434" \
3029
-d message_thread_id="2" \
31-
-d parse_mode="Markdown" \
3230
--data-urlencode "text=${TEXT}"
3331
3432
- name: Send full content to Telegram channel
@@ -37,9 +35,8 @@ jobs:
3735
CHANNEL_ID: ${{ secrets.TELEGRAM_CHANNEL_ID }}
3836
run: |
3937
if [ -n "$CHANNEL_ID" ]; then
40-
TEXT="📦 新增资源推送\n\n${{ github.event.head_commit.message }}\n\n🔗 超过100T资料总站网站:https://doc.869hr.uk\n📂 查看详情:${{ github.event.head_commit.url }}"
38+
TEXT=$'📦 新增资源推送\n\n${{ github.event.head_commit.message }}\n\n🔗 资料总站:https://doc.869hr.uk\n📂 GitHub:${{ github.event.head_commit.url }}'
4139
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \
4240
-d chat_id="$CHANNEL_ID" \
43-
-d parse_mode="Markdown" \
4441
--data-urlencode "text=${TEXT}"
4542
fi

0 commit comments

Comments
 (0)