SenKongDao Daily Schedule Workflow #1
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: SenKongDao Daily Schedule Workflow | |
on: | |
schedule: | |
- cron: '0 20 * * *' # UTC+8=凌晨4点 | |
workflow_dispatch: # 添加手动触发事件 | |
jobs: | |
run-python-job: | |
runs-on: ubuntu-latest | |
env: | |
UID: ${{ secrets.UID }} | |
ATOKEN: ${{ secrets.ATOKEN }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run Python script | |
if: github.event_name == 'schedule' | |
run: python SenKongDao.py | |
- name: Manual Test Step | |
if: github.event_name == 'workflow_dispatch' | |
run: python SenKongDao.py |