Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/buka-inc/actions.telegram-notify

Telegram Notify
https://github.com/buka-inc/actions.telegram-notify

Last synced: 3 days ago
JSON representation

Telegram Notify

Awesome Lists containing this project

README

        

# actions.telegram-notify

向 Telegram 群组指定的 Topic 推送消息。

## Inputs

| **Arguments** | **Required** | **Description** |
| :------------------ | :----------- | ---------------------------------------------------------------------------------------------------- |
| token | true | Telegram Token (`https://api.telegram.org/bot{{token}}/sendMessage`) |
| chartId | true | Telegram Chat ID |
| messageThreadId | true | The Id Of Telegram Topic |
| text | true | 消息体 |
| parseMode | false | `"MarkdownV2" \| "HTML" \| "Markdown"` [详见](https://core.telegram.org/bots/api#formatting-options) |
| disableNotification | false | 静默,用户将收到无声消息 |
| protectContent | false | 保护消息不会被转发或者保存 |

## Example

```yaml
name: Test

on: push

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- id: telegram
uses: buka-inc/actions.telegram-notify@v1
with:
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
chatId: ${{ secrets.TELEGRAM_CHAT_ID }}
# Telegram Topic Id
messageThreadId: 1234
text: "Hello World"
- if: steps.telegram.outputs.success === "true"
run: echo "SUCCESS"
```