Update DNS snapshot #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |