GitHub Actions CloudFlare2DNSPod Bot #4033
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: 'GitHub Actions CloudFlare2DNSPod Bot' | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '*/360 * * * *' | |
env: | |
UPDATE_IPV4: true | |
UPDATE_IPV6: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v3 | |
- name: 'Set up Python' | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
- name: 'Install dependencies' | |
run: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: 'run cf2dns v4' | |
if: env.UPDATE_IPV4 == 'true' && !cancelled() | |
env: | |
KEY: ${{ secrets.KEY }} | |
DOMAINS: ${{ secrets.DOMAINS }} | |
SECRETID: ${{ secrets.SECRETID }} | |
SECRETKEY: ${{ secrets.SECRETKEY }} | |
run: python cf2dns_actions.py A | |
- name: 'run cf2dns v6' | |
if: env.UPDATE_IPV6 == 'true' && !cancelled() | |
env: | |
KEY: ${{ secrets.KEY }} | |
DOMAINS: ${{ secrets.DOMAINSV6 }} | |
SECRETID: ${{ secrets.SECRETID }} | |
SECRETKEY: ${{ secrets.SECRETKEY }} | |
run: python cf2dns_actions.py AAAA |