Upload gov.txt.gz from CZDS API #34
Workflow file for this run
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: Upload gov.txt.gz from CZDS API | |
run-name: Upload gov.txt.gz from CZDS API | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: "5 6 * * *" | |
push: | |
branches: | |
- es/107-zone-file-script | |
paths: | |
- .github/workflows/update-gov-zone-file.yml | |
jobs: | |
update_zone_file: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download gov.txt.gz | |
env: | |
ICANN_USERNAME: ${{ secrets.ICANN_USERNAME }} | |
ICANN_PASSWORD: ${{ secrets.ICANN_PASSWORD }} | |
CI_COMMIT_AUTHOR: Continuous Integration | |
CI_COMMIT_MESSAGE: Continuous Integration Push Daily Zone File Update | |
run: | | |
chmod +x ./scripts/download_zone_file.sh | |
./scripts/download_zone_file.sh ${{ env.ICANN_USERNAME }} ${{ env.ICANN_PASSWORD }} | |
shell: sh | |
- uses: actions/checkout@v4 | |
- name: Commit and push updated zone file update to branch | |
run: | | |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | |
git config --global user.email "[email protected]" | |
git add ./gov.zone.txt | |
git commit -m "${{ env.CI_COMMIT_MESSAGE }}" | |
# Uploads the .gov zone file to Github artifact gov_zone_file | |
# - name: Upload retrieved .gov zone file | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: gov_zone_file | |
# path: ./gov.zone.txt |