WechatOnCloud/.github/workflows/telegram-notify.yml
Kris e35f1d64cf feat: 初始化项目,添加完整的微信云部署方案与面板实现
包含以下核心内容:
1.  完整的Docker容器化部署方案,支持多架构amd64/arm64
2.  自研Web管理面板,包含登录认证、实例管理、权限控制
3.  微信实例容器镜像,内置中文字体与输入法修复
4.  飞牛OS应用打包适配
5.  完整的文档与运维指南
2026-07-05 03:50:30 +08:00

56 lines
2.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: telegram-notify
# 新版本发布 / 新 issue 时把内容GitHub Markdown → Telegram HTML 渲染)推送到 Telegram 群组。
# 跑在 GitHub Actions 上,无需服务器;未配置 TELEGRAM_CHAT_ID 则自动跳过。
#
# 一次性配置(仓库 Settings → Secrets and variables → Actions
# · Variables → TELEGRAM_CHAT_ID = 群组 chat id形如 -1001234567890取法见 doc/发布到GHCR.md
# · Secrets → TELEGRAM_BOT_TOKEN = @BotFather 的 token
# 并把机器人拉进群组。
#
# 手动测试渲染效果Actions → telegram-notify → Run workflow会把「最新 release」渲染后发到群
on:
release:
types: [published]
issues:
types: [opened]
issue_comment:
types: [created]
workflow_dispatch: {}
permissions:
contents: read
jobs:
notify:
runs-on: ubuntu-latest
if: ${{ vars.TELEGRAM_CHAT_ID != '' }}
steps:
- uses: actions/checkout@v4
- name: Render & send to Telegram
env:
TG_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TG_CHAT: ${{ vars.TELEGRAM_CHAT_ID }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
EVENT: ${{ github.event_name }}
# 经 env 传任意文本,避免命令注入
R_TAG: ${{ github.event.release.tag_name }}
R_NAME: ${{ github.event.release.name }}
R_URL: ${{ github.event.release.html_url }}
R_BODY: ${{ github.event.release.body }}
I_NUM: ${{ github.event.issue.number }}
I_TITLE: ${{ github.event.issue.title }}
I_URL: ${{ github.event.issue.html_url }}
I_USER: ${{ github.event.issue.user.login }}
I_BODY: ${{ github.event.issue.body }}
# issue_comment 事件issue 下的新回复PR 评论也走此事件,脚本里据 C_PR 跳过)
C_NUM: ${{ github.event.issue.number }}
C_TITLE: ${{ github.event.issue.title }}
C_URL: ${{ github.event.comment.html_url }}
C_USER: ${{ github.event.comment.user.login }}
C_BODY: ${{ github.event.comment.body }}
C_PR: ${{ github.event.issue.pull_request.html_url }}
run: node .github/scripts/tg-notify.mjs