Run Python Script #63
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: 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 |