Daily Job #8
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: 'Daily Job' | |
on: | |
schedule: | |
- cron: '0 0 * * *' # 每天UTC时间00:00运行 | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'Environment to deploy to' | |
required: true | |
default: 'production' | |
jobs: | |
run_job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
- name: Run Python script | |
run: python main.py | |
- name: Upload generated files | |
uses: actions/upload-artifact@v2 | |
with: | |
name: generated-files | |
path: | | |
output |