You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Telegram Msg
2.0.0
通过actions向telegram发送消息
发送一条自定义消息
name: Telegram-Msg
on: [push]
jobs:
sendMsg:
name: sendMsg
runs-on: ubuntu-latest
steps:
- uses: colutius/Telegram-Msg@main
with:
token: ${{ secrets.TELEGRAM_TOKEN }}
chatid: ${{ secrets.TELEGRAM_TO }}
message: |
👇新的提交👇
👤提交人: [${{ github.actor }}]
📄提交信息: ${{ github.event.commits[0].message }}
📦仓库: ${{ github.repository }}
button: true
button_name: 👀查看更改👀
button_url: https://github.com/${{ github.repository }}/commit/${{github.sha}}
不加可选参数发送默认消息
- uses: colutius/Telegram-Msg@main
with:
token: ${{ secrets.TELEGRAM_TOKEN }}
chatid: ${{ secrets.TELEGRAM_TO }}
- button:
true
或false
,是否添加链接按钮,默认为true
- button_name: 按钮名称,默认为
👀查看更改👀
- button_url: 按钮链接地址,默认为
https://github.com/${{ github.repository }}/commit/${{github.sha}}
token
: Telegram bot tokenchatid
: chat id