Skip to content

Commit

Permalink
更新推送Canary频道的格式#2
Browse files Browse the repository at this point in the history
  • Loading branch information
elysias123 committed Nov 30, 2023
1 parent b3cd0f7 commit ffae814
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,18 @@ jobs:
cd ${{ github.workspace }}/git_clone
ESCAPED=$(python3 -c 'import json,os,urllib.parse; print(urllib.parse.quote(json.dumps(os.environ["COMMIT_MESSAGE"])))')
cd ${{ github.workspace }}
curl -v "https://api.telegram.org/bot${BOT_TOKEN}/sendMediaGroup?chat_id=${CHANNEL_ID}&media=%5B%7B%22type%22%3A%22document%22%2C%20%22media%22%3A%22attach%3A%2F%2Fcanary%22%2C%22parse_mode%22%3A%22MarkdownV2%22%2C%22caption%22%3A%22${ESCAPED}%22%7D%5D" -F canary="@${CANARY}"
curl -v "https://api.telegram.org/bot${BOT_TOKEN}/sendMediaGroup" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${CHANNEL_ID}"'",
"media": [
{
"type": "document",
"media": "'"${CANARY}"'",
"parse_mode": "MarkdownV2",
"caption": "'"${ESCAPED}"'"
}
]
}'

0 comments on commit ffae814

Please sign in to comment.