-
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (36 loc) · 1.22 KB
/
main.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
40
41
42
43
44
45
46
47
48
name: PSL
on:
push:
branches: [main]
paths:
- "list/*"
- "scripts/*"
- ".github/workflows/main.yml"
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
convert:
name: Convert
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- run: mkdir -p list
- name: Download public_suffix_list.dat
run: curl -o list/public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat
- name: Convert public_suffix_list.dat to JSON
run: node scripts/json.js
- name: Minify public_suffix_list.dat
run: node scripts/minify.js
- run: rm list/public_suffix_list.dat
- name: Commit
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add list/*
git pull
git commit --allow-empty -m "chore: convert PSL to different formats"
git push