Skip to content

Update TLDs list

Update TLDs list #726

name: Update TLDs list
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
jobs:
update_tlds_list:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PAT }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Python packages
run: |
python -m pip install --upgrade pip
pip install -r tools/requirements.txt
- name: Make TLD list file
run: python tools/make_tld_list.py
- name: Check if there are any changes
id: verify_diff
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: Update TLD file
if: steps.verify_diff.outputs.changed == 'true'
run: |
git config --global user.name 'Krypton'
git config --global user.email '[email protected]'
git commit -am "chore: TLDs list update of `date +'%Y-%m-%d %H:%M:%S'`"
git push