Create main.yam

This commit is contained in:
jc-lw 2024-10-20 15:53:49 +08:00 committed by GitHub
parent b580aa335b
commit 56903c8f44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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