youxuanyuming/.github/workflows/main.yml
公众号『乐享汇fans』 af4d278ce0
Update main.yml
2024-11-08 09:07:24 +08:00

32 lines
700 B
YAML

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