Synchronize some directories with the Internet #150
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: Synchronize some directories with the Internet | |
on: | |
schedule: | |
# Trigger every Sunday at 5:00 | |
- cron: '0 5 * * 0' | |
jobs: | |
sync-inet: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: | | |
pip install dnspython pycryptodomex | |
- uses: actions/checkout@v4 | |
- name: Update GPG keys | |
run: make -C gpg sync-inet | |
- name: Update DNSSEC records | |
run: make -C python/network/dnssec sync-inet | |
- name: Show the changes | |
run: | | |
git add -A | |
git diff --cached | |
- name: Commit the changes | |
run: | | |
if git status --short | grep '^' ; then | |
git add -A | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions Updater" | |
git commit -m "Update repository $(date --utc +"%Y-%m-%d %H:%M:%S")" | |
git push origin "${GITHUB_REF##*/}" | |
fi |