This commit is contained in:
darkclip committed 2023-07-21 07:44:30 +08:00
1 parent ed2225895b
commit 4b6287baed
6 files changed
+145 -180

No files matched your search

+31 -13
View File
@@ -1,11 +1,11 @@
name: build net
name: build-net
on:
push:
branches:
- 'master'
paths:
- '.github/workflows/**'
- '.github/workflows/build-net.yml'
schedule:
- cron: '0 16 * * *'
@@ -24,27 +24,45 @@ jobs:
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Check out ip-lists branch of gaoyifan/china-operator-ip
- name: Check out reference branch
uses: actions/checkout@v3
with:
repository: gaoyifan/china-operator-ip
ref: ip-lists
path: ip-lists
- name: Checkout sub branch
path: ref
- name: Checkout target branch
uses: actions/checkout@v3
with:
ref: net
path: net
- name: Clean sub branch
path: target
- name: Clean target branch
continue-on-error: true
run: rm net/*
- name: Rebuild sub branch
run: ./exp_net.sh
- name: Push to sub branch
run: rm target/*
- name: Rebuild target branch
run: |
./netgen.py ref/china.txt -o target/china.txt
./netgen.py ref/china6.txt -o target/china6.txt
./netgen.py ref/chinanet.txt -o target/telecom.txt
./netgen.py ref/chinanet6.txt -o target/telecom6.txt
./netgen.py ref/unicom.txt -o target/unicom.txt
./netgen.py ref/unicom6.txt -o target/unicom6.txt
./netgen.py ref/china.txt -e ref/chinanet.txt ref/unicom.txt -o target/others.txt
./netgen.py ref/china6.txt -e ref/chinanet6.txt ref/unicom6.txt -o target/others6.txt
./netgen.py 0.0.0.0/0 -e private.txt ref/china.txt -o target/foreign.txt
./netgen.py ::/0 -e private6.txt ref/china6.txt -o target/foreign6.txt
./netgen.py private.txt -o target/private.txt
./netgen.py private6.txt -o target/private6.txt
cd target
tree -H . -P "*.txt" -T "IP List - $(date +%Y-%m-%d)" > index.html
- name: Push to target branch
continue-on-error: true
run: |
cd net
tree -H . -P "*.txt" -T "IP List - $(date +%Y-%m-%d)" > index.html
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add .