Update Cloudflare DNS #2282
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: Update Cloudflare DNS | |
on: | |
schedule: | |
- cron: '*/30 * * * *' # 每隔三十分钟运行一次 | |
workflow_dispatch: # 手动触发 | |
# push: # 允许提交触发 | |
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 |