Skip to content

修改工作流

修改工作流 #4

Workflow file for this run

name: Python CI
on:
# 每天0点1分触发(UTC时间)
schedule:
- cron: '1 0 * * *'
# 允许手动触发工作流
workflow_dispatch:
# 提交代码到指定分支时触发
push:
branches:
- main # 只在主分支提交时触发
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt # 假设你的项目有 requirements.txt
- name: Write config.json from environment variable
run: |
echo "生成 config.json 文件..."
echo "${{ secrets.CONFIG_JSON }}" > config.json
- name: Run Python script
run: python 69yun.py # 执行你的 Python 脚本