Create main.yam
This commit is contained in:
parent
b580aa335b
commit
56903c8f44
30
.github/workflows/main.yam
vendored
Normal file
30
.github/workflows/main.yam
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
name: Update Cloudflare DNS
|
||||
|
||||
on:
|
||||
# schedule:
|
||||
# - cron: '*/30 * * * *' # 每隔三十分钟运行一次
|
||||
workflow_dispatch: # 手动触发
|
||||
|
||||
jobs:
|
||||
update-dns:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x' # 你可以指定需要的 Python 版本
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install requests
|
||||
|
||||
- name: Run update script
|
||||
env:
|
||||
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
|
||||
run: |
|
||||
python bestdomain.py
|
Loading…
x
Reference in New Issue
Block a user