forgejo-actions/README.md
RMSTechStudio 082fa47815 init: notify-telegram composite action
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 15:39:10 +02:00

48 lines
1.4 KiB
Markdown

## forgejo-actions
Composite actions reused across all RMS Tech Studio repos.
### notify-telegram
Pings a Telegram chat about a workflow outcome. Skips silently if credentials are missing.
**Setup once (org-level)** — in Forgejo, go to your org → Settings → Actions → Secrets, add:
- `TELEGRAM_BOT_TOKEN`
- `TELEGRAM_CHAT_ID`
These propagate to all repos under the org.
**Usage in a workflow:**
```yaml
- name: Notify Telegram (success)
if: success()
uses: rmstechstudio/forgejo-actions/notify-telegram@main
with:
bot-token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
chat-id: ${{ secrets.TELEGRAM_CHAT_ID }}
status: success
title: "RMS Ecosystem deploy"
message: ${{ github.event.head_commit.message }}
- name: Notify Telegram (failure)
if: failure()
uses: rmstechstudio/forgejo-actions/notify-telegram@main
with:
bot-token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
chat-id: ${{ secrets.TELEGRAM_CHAT_ID }}
status: failure
title: "RMS Ecosystem deploy"
```
**Inputs:**
| Name | Required | Default | Description |
|------|----------|---------|-------------|
| `bot-token` | yes | — | Telegram bot token |
| `chat-id` | yes | — | Telegram chat id |
| `status` | yes | — | `success` or `failure` |
| `title` | yes | — | Short label, e.g. "RMS Ecosystem deploy" |
| `message` | no | `""` | Extra body (commit msg, error summary…) |
| `notify-on-success` | no | `true` | Set `false` for silent crons |