恢复vless服务并发送Telegram消息 #282
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 恢复vless服务并发送Telegram消息 | |
on: | |
schedule: | |
- cron: '*/20 * * * *' # 每20分钟执行一次 | |
workflow_dispatch: | |
jobs: | |
restore_and_notify: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: 设置Python环境 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' # 替换为您需要的 Python 版本 | |
- name: 安装依赖 | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests # 只需安装需要的依赖,此处假设使用 requests 发送 HTTP 请求 | |
- name: 执行Python脚本恢复vless服务并发送Telegram消息 | |
env: | |
ACCOUNTS_JSON: ${{ secrets.ACCOUNTS_JSON }} | |
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }} | |
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | |
run: | | |
python3 vless/recover_vless.py | |