包含以下核心内容: 1. 完整的Docker容器化部署方案,支持多架构amd64/arm64 2. 自研Web管理面板,包含登录认证、实例管理、权限控制 3. 微信实例容器镜像,内置中文字体与输入法修复 4. 飞牛OS应用打包适配 5. 完整的文档与运维指南
41 lines
1.5 KiB
YAML
41 lines
1.5 KiB
YAML
name: telegram-bot
|
||
|
||
# Telegram 命令机器人(轮询版)——无需服务器,仅靠 GitHub Actions cron。
|
||
# 私聊 / 群组都可用命令查询:/help /releases /release <tag> /issues /issue <编号>。
|
||
#
|
||
# 启用(一次性):
|
||
# 1) 已配置 telegram-notify 用到的 TELEGRAM_BOT_TOKEN(Secret)即可复用;
|
||
# 2) 仓库 Settings → Secrets and variables → Actions → Variables 新建
|
||
# TELEGRAM_BOT_ENABLED = true (未设为 true 则本工作流不运行,避免空跑)
|
||
# 3) 把机器人拉进群组 / 在私聊里 /start。
|
||
#
|
||
# 局限:cron 最小 5 分钟且可能再延后 → 命令非实时;GitHub 会在仓库 60 天无活动时暂停定时任务。
|
||
# 想立即处理一次:Actions → telegram-bot → Run workflow(workflow_dispatch)。
|
||
|
||
on:
|
||
schedule:
|
||
- cron: '*/5 * * * *'
|
||
workflow_dispatch: {}
|
||
|
||
permissions:
|
||
contents: read
|
||
issues: read
|
||
|
||
# 避免轮询任务并发重叠重复处理;新触发取消正在跑的(残留未确认更新下次重处理,无副作用)
|
||
concurrency:
|
||
group: telegram-bot
|
||
cancel-in-progress: true
|
||
|
||
jobs:
|
||
poll:
|
||
runs-on: ubuntu-latest
|
||
if: ${{ vars.TELEGRAM_BOT_ENABLED == 'true' }}
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
- name: Poll Telegram & handle commands
|
||
env:
|
||
TG_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
REPO: ${{ github.repository }}
|
||
run: node .github/scripts/telegram-bot.mjs
|