Skip to content

add nix name to zphyrs #30

add nix name to zphyrs

add nix name to zphyrs #30

name: Execute DNS Updates
on:
push:
branches: [ "master" ]
paths: ['domains/**']
pull_request:
branches: [ "master" ]
paths: ['domains/**']
permissions:
contents: write
jobs:
execute:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Update Porkbun DNS Records
env:
PYRK_API_KEY: ${{ secrets.PYRK_API_KEY }}
PYRK_API_SECRET_KEY: ${{ secrets.PYRK_API_SECRET_KEY }}
PYRK_RATE: '3'
PYRK_RETRIES: '2'
PYTHONPATH: ${{ github.workspace }}
run: |
echo "EXECUTE_RESULT=$(python dns_execute.py)" >> $GITHUB_ENV
# Check if a commit is required based on updates to the DNS records and run commit
- name: Commit Updates
if: ${{env.EXECUTE_RESULT == 'COMMIT_REQUIRED'}}
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git commit -a -m "update record ids"
git push