Skip to content

Commit 0f990b5

Browse files
MM
authored andcommitted
fix: 修改频道通知链接为网站页面URL(而非GitHub提交URL)
1 parent b513f7a commit 0f990b5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/notify.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ jobs:
1515
CHANNEL_ID: ${{ secrets.TELEGRAM_CHANNEL_ID }}
1616
run: |
1717
if [ -n "$CHANNEL_ID" ]; then
18-
TEXT=$'📦 新增资源推送\n\n${{ github.event.head_commit.message }}\n\n🔗 资料总站:https://doc.869hr.uk\n📂 GitHub:${{ github.event.head_commit.url }}'
18+
# 生成当前年月的网站页面链接(格式:YYYYMM)
19+
CURRENT_MONTH=$(date +'%Y%m')
20+
WEBSITE_URL="https://doc.869hr.uk/edu-knowlege/${CURRENT_MONTH}"
21+
22+
TEXT=$'📦 新增资源推送\n\n${{ github.event.head_commit.message }}\n\n🔗 查看详情:'${WEBSITE_URL}$'\n🌐 资料总站:https://doc.869hr.uk'
1923
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \
2024
-d chat_id="$CHANNEL_ID" \
2125
--data-urlencode "text=${TEXT}"

0 commit comments

Comments
 (0)