name: 自动采集 # 触发条件 on: workflow_dispatch: # 定时触发 schedule: # 每12小时获取一次 - cron: '0 */12 * * *' permissions: contents: write concurrency: group: repository-updates cancel-in-progress: false env: TZ: Asia/Shanghai jobs: deploy: runs-on: ubuntu-latest timeout-minutes: 20 steps: - name: 迁出代码 uses: actions/checkout@v7 - name: 安装Python uses: actions/setup-python@v7 with: python-version: '3.12' cache: pip cache-dependency-path: requirements.txt - name: 安装依赖 run: | python -m pip install -r requirements.txt - name: 回归检查 run: python -m unittest discover -s tests - name: Worker 回归检查 run: node --test worker/sub.test.mjs - name: 执行任务 run: | python main.py - name: TCP 连通性分类 run: python check_nodes.py - name: 提交更改 run: | git config core.ignorecase false git config --local user.email "admin@ermao.net" git config --local user.name "ermaozi" git add subscribe log git diff --cached --quiet && exit 0 git commit -m "$(date '+%Y-%m-%d %H:%M:%S')更新订阅链接" git push