Skip to content

Monthly TLD Update

Monthly TLD Update #6

Workflow file for this run

name: Monthly TLD Update
on:
schedule:
# Runs at 00:00 EST on the 1st day of every month
- cron: '0 5 1 * *'
workflow_dispatch:
jobs:
update-tld:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.TLD_PAT }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install requests
pip install .
- name: Run update script
run: python -m pyrolysate.cli --update -o ./pyrolysate/tld.txt
- name: Commit and push changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add pyrolysate/tld.txt
git diff --quiet && git diff --staged --quiet || (git commit -m "chore: monthly update of IANA TLD list" && git push)