Skip to content

Update DNS snapshot

Update DNS snapshot #6

name: Update DNS snapshot
on:
workflow_dispatch:
schedule:
- cron: '5 1 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update DNS snapshot
run: ./update-snapshot.sh
working-directory: ./dns
env:
DOMENESHOP_TOKEN: ${{ secrets.DOMENESHOP_TOKEN }}
DOMENESHOP_SECRET: ${{ secrets.DOMENESHOP_SECRET }}
- name: Push changes if detected
run: |
if ! git diff --quiet dns; then
echo "Changes detected - will push"
git diff dns
git config --global user.name 'IT-gruppa'
git config --global user.email '[email protected]'
git add dns
git commit -m "Update DNS snapshot"
git push
else
echo "Already up-to-date"
fi