-
Notifications
You must be signed in to change notification settings - Fork 5
153 lines (141 loc) · 7.75 KB
/
cron.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: Build
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
push:
paths-ignore:
- "**/README.md"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout data source
uses: actions/checkout@v2
with:
repository: v2fly/domain-list-community
path: domain-list-community
- name: Setup Go 1.x.y
uses: actions/setup-go@v2
with:
go-version: ^1.18
- name: Generate
run: |
cd domain-list-community
echo "auvpn.net" >> ./data/category-vpnservices
echo "ausososo.click" >> ./data/category-vpnservices
echo "ausososo.club" >> ./data/category-vpnservices
echo "ausososo.online" >> ./data/category-vpnservices
echo "ausu.autos @cn" >> ./data/category-vpnservices
echo "ausu.beauty @cn" >> ./data/category-vpnservices
echo "ausu.hair @cn" >> ./data/category-vpnservices
echo "ausu.lol @cn" >> ./data/category-vpnservices
echo "ausu.mom @cn" >> ./data/category-vpnservices
echo "ausu.pics @cn" >> ./data/category-vpnservices
echo "ausu.quest @cn" >> ./data/category-vpnservices
echo "ausu.shop @cn" >> ./data/category-vpnservices
echo "ausu.skin @cn" >> ./data/category-vpnservices
echo "ausvc.link @cn" >> ./data/category-vpnservices
echo "iijj.sbs @cn" >> ./data/category-vpnservices
echo "full:api.inforun.work @cn" >> ./data/category-vpnservices
echo "full:api.bitbroker.cc @cn" >> ./data/category-vpnservices
echo "full:repo.o2cdn.icu @cn" >> ./data/category-vpnservices
echo "full:repo.ou-er.click @cn" >> ./data/category-vpnservices
echo "splashtop.com @cn" >> ./data/category-vpnservices
cd ../clash
go run main.go ../domain-list-community ../release/clash
wget --no-check-certificate -O ../release/clash/Country.mmdb https://raw.githubusercontent.com/yuumimi/geoip/release/Country.mmdb
wget --no-check-certificate -O ../release/clash/geoip.dat https://raw.githubusercontent.com/yuumimi/geoip/release/geoip.dat
wget --no-check-certificate -O ../release/clash/geosite.dat https://raw.githubusercontent.com/yuumimi/geosite/release/geosite.dat
cd ../loon
go run main.go ../domain-list-community ../release/loon
wget --no-check-certificate -O ../release/loon/cn.mmdb https://raw.githubusercontent.com/yuumimi/chnroutes2mmdb/release/chnroutes.mmdb
cd ../qx
go run main.go ../domain-list-community ../release/qx
wget --no-check-certificate -O ../release/qx/cn.mmdb https://raw.githubusercontent.com/yuumimi/chnroutes2mmdb/release/chnroutes.mmdb
cd ../surge
go run main.go ../domain-list-community ../release/surge
wget --no-check-certificate -O ../release/surge/cn.mmdb https://raw.githubusercontent.com/yuumimi/chnroutes2mmdb/release/chnroutes.mmdb
cd ..
cat ./release/clash/cn.txt | grep -Ev '^$|#|payload' > 1.tmp
cat ./release/clash/cn@\!cn.txt | grep -Ev '^$|#|payload' > 2.tmp
cat ./release/clash/geolocation-\!cn.txt | grep -Ev '^$|#|payload' > 3.tmp
cat ./release/clash/geolocation-\[email protected] | grep -Ev '^$|#|payload' > 4.tmp
cat 1.tmp 2.tmp 2.tmp | sort | uniq -u > 5.tmp
cat 5.tmp 4.tmp | sort | uniq > 6.tmp
cat 3.tmp 4.tmp 4.tmp | sort | uniq -u > 7.tmp
cat 7.tmp 2.tmp | sort | uniq > 8.tmp
sed -e '/+/d' 6.tmp > 61.tmp
cat 6.tmp 61.tmp | sort | uniq -u > 62.tmp
cat 61.tmp 62.tmp > 63.tmp
sed -e '/+/d' 8.tmp > 81.tmp
cat 8.tmp 81.tmp | sort | uniq -u > 82.tmp
cat 81.tmp 82.tmp > 83.tmp
sed '1i# Generated from https://github.com/v2fly/domain-list-community/tree/master/data/cn\n\n# Behavior: domain\n\npayload:' 63.tmp > ./release/clash/cn.txt
sed '1i# Generated from https://github.com/v2fly/domain-list-community/tree/master/data/geolocation-!cn\n\n# Behavior: domain\n\npayload:' 83.tmp > ./release/clash/geolocation-\!cn.txt
cat ./release/loon/cn.txt | grep -Ev '^$|#' > 1.tmp
cat ./release/loon/cn@\!cn.txt | grep -Ev '^$|#' > 2.tmp
cat ./release/loon/geolocation-\!cn.txt | grep -Ev '^$|#' > 3.tmp
cat ./release/loon/geolocation-\[email protected] | grep -Ev '^$|#' > 4.tmp
cat 1.tmp 2.tmp 2.tmp | sort | uniq -u > 5.tmp
cat 5.tmp 4.tmp | sort | uniq > 6.tmp
cat 3.tmp 4.tmp 4.tmp | sort | uniq -u > 7.tmp
cat 7.tmp 2.tmp | sort | uniq > 8.tmp
sed '1i# Generated from https://github.com/v2fly/domain-list-community/tree/master/data/cn\n' 6.tmp > ./release/loon/cn.txt
sed '1i# Generated from https://github.com/v2fly/domain-list-community/tree/master/data/geolocation-!cn\n' 8.tmp > ./release/loon/geolocation-\!cn.txt
cat ./release/qx/cn.txt | grep -Ev '^$|#' > 1.tmp
cat ./release/qx/cn@\!cn.txt | grep -Ev '^$|#' > 2.tmp
cat ./release/qx/geolocation-\!cn.txt | grep -Ev '^$|#' > 3.tmp
cat ./release/qx/geolocation-\[email protected] | grep -Ev '^$|#' > 4.tmp
cat 1.tmp 2.tmp 2.tmp | sort | uniq -u > 5.tmp
cat 5.tmp 4.tmp | sort | uniq > 6.tmp
cat 3.tmp 4.tmp 4.tmp | sort | uniq -u > 7.tmp
cat 7.tmp 2.tmp | sort | uniq > 8.tmp
sed -i 's/proxy$/direct/g' 6.tmp
sed '1i# Generated from https://github.com/v2fly/domain-list-community/tree/master/data/cn\n' 6.tmp > ./release/qx/cn.txt
sed '1i# Generated from https://github.com/v2fly/domain-list-community/tree/master/data/geolocation-!cn\n' 8.tmp > ./release/qx/geolocation-\!cn.txt
cat ./release/surge/cn.txt | grep -Ev '^$|#' > 1.tmp
cat ./release/surge/cn@\!cn.txt | grep -Ev '^$|#' > 2.tmp
cat ./release/surge/geolocation-\!cn.txt | grep -Ev '^$|#' > 3.tmp
cat ./release/surge/geolocation-\[email protected] | grep -Ev '^$|#' > 4.tmp
cat 1.tmp 2.tmp 2.tmp | sort | uniq -u > 5.tmp
cat 5.tmp 4.tmp | sort | uniq > 6.tmp
cat 3.tmp 4.tmp 4.tmp | sort | uniq -u > 7.tmp
cat 7.tmp 2.tmp | sort | uniq > 8.tmp
sed -e '/^\./d' 6.tmp > 61.tmp
cat 6.tmp 61.tmp | sort | uniq -u > 62.tmp
cat 61.tmp 62.tmp > 63.tmp
sed -e '/^\./d' 8.tmp > 81.tmp
cat 8.tmp 81.tmp | sort | uniq -u > 82.tmp
cat 81.tmp 82.tmp > 83.tmp
sed '1i# Generated from https://github.com/v2fly/domain-list-community/tree/master/data/cn\n' 63.tmp > ./release/surge/cn.txt
sed '1i# Generated from https://github.com/v2fly/domain-list-community/tree/master/data/geolocation-!cn\n' 83.tmp > ./release/surge/geolocation-\!cn.txt
- name: Get Commit Message
id: message
uses: actions/github-script@v3
env:
FULL_COMMIT_MESSAGE: '${{ github.event.head_commit.message }}'
with:
result-encoding: string
script: |
var message = `${process.env.FULL_COMMIT_MESSAGE}`;
core.info(message);
if (message != '') return message;
var time = new Date(Date.now()).toISOString();
core.info(time);
return `Generate at ${time}`;
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
exclude_assets: '.nojekyll'
publish_branch: release
publish_dir: ./release
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
full_commit_message: ${{ steps.message.outputs.result }}
force_orphan: true
enable_jekyll: true