Scheduled Python Worker #14
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 20 * * *" # 每天 UTC 时间 00: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/__init__.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 |