Skip to content

Update TLDs

Update TLDs #170

Workflow file for this run

name: Update TLDs
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 6'
jobs:
UpdateTLDs:
name: Update TLD's
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3
- name: Use Node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- name: Install Dependencies
run: yarn --immutable
- name: Run the TLD updater script
run: yarn scripts:tlds
- name: Commit any changes and create a pull request
env:
GITHUB_USER: github-actions[bot]
GITHUB_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git add .;
if git diff-index --quiet HEAD --; then
echo "No changes to commit, exiting with code 0"
exit 0;
else
git remote set-url origin "https://${GITHUB_TOKEN}:[email protected]/${GITHUB_REPOSITORY}.git";
git config --local user.email "${GITHUB_EMAIL}";
git config --local user.name "${GITHUB_USER}";
git checkout -b update-tlds/$(date +%F-%H-%M);
git commit -sam "refactor: update TLDs";
git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)
gh pr create -t "refactor: update TLDs" -b "*bleep bloop* I updated the TLDs file" -B main;
fi