diff --git a/.github/workflows/dns-check.yml b/.github/workflows/dns-check.yml index c6455143..59841e29 100644 --- a/.github/workflows/dns-check.yml +++ b/.github/workflows/dns-check.yml @@ -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: | @@ -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