Skip to content

Commit

Permalink
Copy content to gov.txt in yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
erinysong committed Feb 23, 2024
1 parent 463f2dd commit d462a9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-gov-zone-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
ICANN_PASSWORD: '${{ secrets.ICANN_PASSWORD }}'
run: |
chmod +x ./scripts/download_zone_file.sh
./scripts/download_zone_file.sh '${{ env.ICANN_USERNAME }}' '${{ env.ICANN_PASSWORD }}'
./scripts/download_zone_file.sh '${{ env.ICANN_USERNAME }}' '${{ env.ICANN_PASSWORD }}' > gov.txt
shell: sh
# Push daily zone file to branch only if a diff is found
- name: Commit and push updated zone file update to branch
Expand Down
2 changes: 1 addition & 1 deletion scripts/download_zone_file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ ICANN_password=$2
authentication_data="{\"username\":\"$ICANN_username\",\"password\":\"$ICANN_password\"}"
echo $authentication_data
token=$(curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d $authentication_data https://account-api.icann.org/api/authenticate | jq -r .accessToken)
[ ! -z "$token" ] && curl -X GET --output gov.txt.gz -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $token" https://czds-api.icann.org/czds/downloads/gov.zone && gunzip -f ./gov.txt.gz > gov.txt
[ ! -z "$token" ] && curl -X GET --output gov.txt.gz -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $token" https://czds-api.icann.org/czds/downloads/gov.zone && gunzip -f ./gov.txt.gz

0 comments on commit d462a9b

Please sign in to comment.