dns-witch-zones/.gitea/workflows/deploy.yml
Gaël Berthaud-Müller 5822933464
Some checks failed
Deploy zones / Deploy-Zones (push) Failing after 10s
fix typo
2023-05-28 12:49:48 +02:00

33 lines
1.2 KiB
YAML

name: Deploy zones
on: [push]
jobs:
Deploy-Zones:
runs-on: debian-stable
steps:
- name: Install dependencies
run: apt-get update && apt-get install -y knot-dnsutils ssh-client git
- name: Check out repository code
uses: actions/checkout@v3
- name: Build catalog zone
run: |
for zonefile in zones/*; do
zone=$(basename $zonefile .zone)
echo "Checking zone $zone..."
kzonecheck -v -o $zone $zonefile
echo $(echo -n $zone | sha1sum | cut -f1 -d' ').zones 0 IN PTR $zone. >> catalog-zones/dns-witch-catalog.zone
done
- name: Configure SSH client
run: |
eval `ssh-agent -s`
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
mkdir -p $HOME/.ssh
chmod 700 $HOME/.ssh
echo "${{ secrets.SSH_KNOWN_HOSTS }}" >> $HOME/.ssh/known_hosts
echo "${{ secrets.SSH_CONFIG }}" >> $HOME/.ssh/config
chmod 644 $HOME/.ssh/{known_hosts,config}
echo "SSH_AUTH_SOCK=${SSH_AUTH_SOCK}" >> $GITHUB_ENV
- name: Deploy zones
run: |
scp -r zones catalog-zones ${{ secrets.SSH_PRIMARY_NS }}:/var/lib/knot/
ssh ${{ secrets.SSH_PRIMARY_NS }} /usr/sbin/knotc reload