cfst: 初始化提交 #55
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: Run autoddnsv6 | |
on: | |
push: | |
branches: | |
- main # 仅在推送到 main 分支时触发,可以修改为你想要的分支 | |
paths: | |
- 'cfip/ipv6.txt' # 只有 ipv6.txt 文件发生变化时才触发 | |
- 'csv/resultv6.csv' | |
jobs: | |
run-autoddns: | |
runs-on: ubuntu-latest | |
env: | |
# 设置环境变量,使用 GitHub Secrets | |
CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }} | |
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }} | |
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }} | |
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run autoddnsv6 script | |
run: | | |
python ddns/autoddnsv6.py |