-
-
Notifications
You must be signed in to change notification settings - Fork 68
39 lines (37 loc) · 1.22 KB
/
update-tlds.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Update TLDs
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
UpdateTLDs:
name: Update TLD's
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4
with:
token: ${{ secrets.SKYRA_TOKEN }}
- name: Use Node.js v22
uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
- name: Install Dependencies
run: yarn --immutable
- name: Run the TLD updater script
run: yarn scripts:tlds
- name: Commit and push any changes
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
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 commit -sam "refactor: update TLDs";
git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)
fi