Skip to content

Add syntax check for pull requests #2

Add syntax check for pull requests

Add syntax check for pull requests #2

name: Validate zonefile syntax
on:
pull_request:
paths:
- 'zonefiles/**.zone'
push:
branches-ignore:
- main
paths:
- 'zonefiles/**.zone'
jobs:
named-checkzone:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Verify zonefile syntax
run: |
set -e
for zonefile in zonefiles/*.zone; do
zone=${zonefile##*/}
zone=${zone%.zone}
named-checkzone "$zone" "$zonefile"
done