-
Notifications
You must be signed in to change notification settings - Fork 168
56 lines (46 loc) · 1.27 KB
/
update-cnip.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
name: Update ip list
on:
workflow_dispatch:
schedule:
- cron: '0 2 1,16 * *'
# watch:
# types: [started]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@main
with:
python-version: '3.x'
check-latest: true
- name: Install dependencies
run:
pip install netaddr requests
- name: generate cn iplist
run:
python scripts/update_chnip.py
- name: generate rules
run: |
for script in ./scripts/generate/*.py; do
python "$script" &
done
- name: Add changed files
run: |
git add chnroute.txt
git add chnroute-ipv4.txt
git add chnroute-ipv6.txt
git add cn.rsc
git add ipv6.list
git add ./Loon/ruleset/ipv6.list
git add chn.acl
git add v2ray-config_rule.json
git add chnroute.pac
- name: Get current date
id: date
run: echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update ${{ steps.date.outputs.date }}"