-
Notifications
You must be signed in to change notification settings - Fork 10
/
工作流代码
28 lines (26 loc) · 826 Bytes
/
工作流代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Daily Python Script Execution
on:
schedule:
- cron: '0 0,8,16 * * *'
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