Skip to content

Run Python Script

Run Python Script #65

Workflow file for this run

name: Run Python Script
on:
schedule:
- cron: '20 13 * * *' # 每天晚上9半点运行
workflow_dispatch: # 允许手动触发
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11' # 指定Python版本
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run Python script
env:
URL: ${{ secrets.URL }}
TOKEN: ${{ secrets.TOKEN }}
SECRET: ${{ secrets.SECRET }}
run: python main.py