-
-
Notifications
You must be signed in to change notification settings - Fork 15
101 lines (75 loc) 路 2.43 KB
/
generate-blocklists.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
name: Generate new committed blocklists
on:
push:
branches:
- main
paths:
- '**.txt'
workflow_dispatch:
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
# lfs: true
# - name: Set up Git LFS
# run: git lfs install
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Prepare templates
run: node scripts/prepare-templates.js
- name: Remove duplicates
run: node scripts/prepare-lines.js
- name: Remove domains that are on the whitelist
run: node scripts/whitelist.js
# - name: Sort templates
# run: node scripts/sort-templates.js
- name: Set valid encoding
run: node scripts/set-valid-encoding.js
- name: Lint
run: node scripts/lint.js
- name: Count domains
run: node scripts/update-number-of-domains.js --ignore-question
# - name: Create everything list
# run: node scripts/create-everything-list.js
- name: Generate No IP list
run: node scripts/generate/noip.js
- name: Generate 0.0.0.0 list
run: node scripts/generate/0.0.0.0.js
- name: Generate 127.0.0.1 list
run: node scripts/generate/127.0.0.1.js
- name: Generate AdGuard list
run: node scripts/generate/adguard.js
- name: Generate Dnsmasq list
run: node scripts/generate/dnsmasq.js
- name: Generate RPZ list
run: node scripts/generate/rpz.js
- name: Generate list for Unbound
run: node scripts/generate/unbound.js
# - name: Track large files
# run: |
# find . -type f -name '*.txt' -size +50M | xargs -I {} git lfs track "{}"
# git add .gitattributes
- name: Add files to staging
run: git add .
- name: Commit and push changes
run: |
git config --global user.name "Sefinek Actions"
git config --global user.email "sefinek.actions@gmail.com"
if [ -n "$(git status -s)" ]; then
git status
git commit -m "Update committed blocklist files"
git push origin main
else
echo "Canceled. No changes to commit."
fi
env:
GITHUB_TOKEN: ${{ secrets.SEFINEK_ACTIONS_PAT }}