-
Notifications
You must be signed in to change notification settings - Fork 141
82 lines (68 loc) · 2.81 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
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
name: Daily Update IP database
on:
push:
branches:
- main
schedule:
- cron: '0 12 * * *'
env:
innoextract_version: 1.9
arch: amd64
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install requests
pip install bs4
- name: Update qqwry.dat
shell: pwsh
run: |
python qqwry.py
unzip *.zip setup.exe
chmod +x innoextract
./innoextract setup.exe -I qqwry.dat
mv app/qqwry.dat qqwry/qqwry.dat
rm -rf setup.exe
rm -rf *.zip*
rm -rf app/
- name: Update GeoLite2-ASN
run: wget https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-ASN.mmdb -O geolite/GeoLite2-ASN.mmdb
- name: Update GeoLite2-City
run: wget https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-City.mmdb -O geolite/GeoLite2-City.mmdb
- name: Update GeoLite2-City
run: wget https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-Country.mmdb -O geolite/GeoLite2-Country.mmdb
- name: Update ip2region
run: |
wget https://github.com/lionsoul2014/ip2region/raw/master/data/ip2region.xdb -O ip2region/ip2region.xdb
wget https://github.com/lionsoul2014/ip2region/raw/master/data/ip.merge.txt -O ip2region/ip.merge.txt
- name: Update 17monipdb
run: wget https://github.com/igreedy/ip_finder/raw/master/17monipdb.dat -O 17monipdb/17monipdb.dat
- name: Update ipv6wry
run: wget https://raw.githubusercontent.com/ZX-Inc/zxipdb-python/main/data/ipv6wry.db -O ipv6wry/ipv6wry.db
- name: Update IPDB
run: wget https://raw.githubusercontent.com/ipipdotnet/ipdb-go/master/city.free.ipdb -O ipdb/city.free.ipdb
- name: Update DB-IP City
run: wget "https://download.db-ip.com/free/dbip-city-lite-$(date +%Y-%m).mmdb.gz" -O db-ip/dbip-city-lite.mmdb.gz
- name: Update DB-IP ASN
run: wget "https://download.db-ip.com/free/dbip-asn-lite-$(date +%Y-%m).mmdb.gz" -O db-ip/dbip-asn-lite.mmdb.gz
- name: Update DB-IP Country
run: wget "https://download.db-ip.com/free/dbip-country-lite-$(date +%Y-%m).mmdb.gz" -O db-ip/dbip-country-lite.mmdb.gz
- name: Commit and Push changes
run: |
echo $(date +'%Y%m%d') > date.txt
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -am "$(date +'%Y%m%d')"
git push -v --progress