Skip to content

Update ip list

Update ip list #34

Workflow file for this run

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@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install netaddr requests
- name: generate cn iplist
run: |
wget 'https://raw.githubusercontent.com/PaPerseller/chn-iplist/master/scripts/update_chnip.py'
python update_chnip.py
- name: generate rules
run: |
wget 'https://raw.githubusercontent.com/PaPerseller/chn-iplist/master/scripts/generate.py'
python generate.py
rm update_chnip.py generate.py
- name: Commit file
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
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 commit -m "AutoUpdate `date +%Y-%m-%d`" -a
git push -f origin master