Skip to content

Daily Python Script Execution #2920

Daily Python Script Execution

Daily Python Script Execution #2920

Workflow file for this run

name: Daily Python Script Execution
on:
schedule:
- cron: '*/10 * * * *'
workflow_dispatch: # 允许手动触发
jobs:
run-python-script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9' # 更新到更新的Python版本
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run Python script
env:
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CF_ZONE_ID: ${{ secrets.CF_ZONE_ID }}
CF_DNS_NAME: ${{ secrets.CF_DNS_NAME }}
PUSHPLUS_TOKEN: ${{ secrets.PUSHPLUS_TOKEN }}
run: python cfdns.py