File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,15 +58,12 @@ jobs:
5858 - name : Send to DingTalk
5959 if : env.DINGDING_TOKEN != ''
6060 env :
61- DINGDING_TOKEN : ${{ secrets.DINGDING_TOKEN }}
61+ DINGDING_TOKEN : ${{ secrets.DINNGDING_TOKEN }}
6262 run : |
6363 DATE=${{ steps.date.outputs.date }}
6464 SITE_URL="https://wayyoungboy.github.io/github-trending-reporter/"
6565 REPO_URL="https://github.com/${{ github.repository }}"
6666
67- # 读取报告内容并进行JSON转义
68- CONTENT=$(cat "${{ steps.find_report.outputs.report_file }}")
69-
7067 # 使用Python进行安全JSON转义
7168 python3 -c "
7269import json
@@ -85,28 +82,13 @@ message = {
8582 ' msgtype ' : ' markdown' ,
8683 ' markdown ' : {
8784 ' title ' : f'每日GitHub趋势报告 - {date}',
88- ' text ' : f'''### **GitHub趋势每日报告** 🚀
89-
90- # ### **报告日期**: {date}
91- # ### **在线查看**: [查看完整报告]({site_url})
92-
93- ---
94-
95- **报告内容**:
96-
97- {content}
98-
99- ---
100-
101- 🔗 [**GitHub Trending Reporter**]({repo_url})
102-
103- *本报告由GitHub Trending Reporter自动生成*'''
85+ ' text ' : f'### **GitHub趋势每日报告** 🚀\n\n#### **报告日期**: {date}\n#### **在线查看**: [查看完整报告]({site_url})\n\n---\n\n**报告内容**:\n\n{content}\n\n---\n\n🔗 [**GitHub Trending Reporter**]({repo_url})\n\n*本报告由GitHub Trending Reporter自动生成*'
10486 }
10587}
10688
10789# 输出JSON到文件
10890with open('dingtalk_message.json', 'w', encoding='utf-8') as f :
109- json.dump(message, f, ensure_ascii=False, indent=2 )
91+ json.dump(message, f, ensure_ascii=False)
11092" " $DATE" "$SITE_URL" "$REPO_URL"
11193
11294 # 发送消息
You can’t perform that action at this time.
0 commit comments