Scheduled Python Worker #3
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: Scheduled Python Worker | |
on: | |
schedule: | |
- cron: "0 17 */2 * *" # 每隔两天 UTC 时间 17:00 (北京时间凌晨 1:00) 运行 | |
workflow_dispatch: # 添加手动触发器 | |
jobs: | |
run-worker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python environment | |
uses: ./.github/actions/setup-python | |
- name: Install prerequisites | |
run: uv sync --all-extras --dev | |
- name: Run Python Script | |
run: uv run src/main.py | |
- name: Commit and Push | |
run: | | |
git config user.name github-actions[bot] | |
git config user.email github-actions[bot]@users.noreply.github.com | |
git add . | |
git diff-index --quiet HEAD || git commit -m "chore: update plugins.json" | |
git push |