Skip to content

Add check for changes to automate removing domains without ns records #26

Add check for changes to automate removing domains without ns records

Add check for changes to automate removing domains without ns records #26

Workflow file for this run

name: DNS
on: [push]
jobs:
dns-check:
name: Checking dns response for domains
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
- run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
name: Python setup
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Requirements
run: pip install -r requirements.txt
- name: Check if list includes domains without NS records
run: |
cd scripts
python3 dnscheck.py
- name: Check for changes
id: git-check
run: |
git diff --exit-code || echo "Changes detected"
continue-on-error: true
- name: Commit updated pihole-google.txt
if: steps.git-check.outcome == 'failure'
run: |
git add pihole-google.txt && git commit -am "Remove domains without NS records"
git push