Skip to content

Commit

Permalink
Update automate removing domains without ns records
Browse files Browse the repository at this point in the history
  • Loading branch information
nickspaargaren committed Aug 4, 2024
1 parent e878bad commit a46b936
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/dns-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ jobs:
dns-check:
name: Remove domains without NS records
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
- run: |
Expand All @@ -21,14 +20,18 @@ jobs:
cd scripts
python3 dnscheck.py
- name: Check for changes
id: check_changes
run: |
if [[ `git status --porcelain pihole-google.txt` ]]; then
echo "Domains found without NS records"
echo "::set-output name=changes_detected::true"
else
echo "No domains without NS records found"
exit 0
echo "::set-output name=changes_detected::false"
fi
- name: Commit updated pihole-google.txt
if: steps.check_changes.outputs.changes_detected == 'true'
run: |
git add pihole-google.txt && git commit -am "Remove domains without NS records"
git add pihole-google.txt
git commit -am "Remove domains without NS records"
git push

0 comments on commit a46b936

Please sign in to comment.