Skip to content

Update Lists

Update Lists #298255

Workflow file for this run

name: Update Lists
on:
push:
paths:
- '*.py'
- 'requirements.txt'
- 'dns_resolvers.yml'
- '.github/workflows/update_lists.yml'
workflow_dispatch:
jobs:
update-lists:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
check-latest: true
cache: 'pip'
- name: Check Python3 Version
run: python3 --version
# - name: Run list_generator.sh
# run: |
# echo 'previos state ...'
# wc -l ipv?_list.txt
# chmod +x list_generator.sh
# ./list_generator.sh
# echo 'new state ...'
# wc -l ipv?_list.txt
- name: Install Dependencies
run: |
pip3 install --upgrade pip
pip3 install -r requirements.txt
- name: Generating IP Lists
run: python3 ./list_generator.py
- name: Generating CIDR Lists
run: python3 ./generate_cidr.py
- name: Update IP count in README.md
run: |
TOTAL_IPS=$(wc -l ipv?_list.txt | grep -oP '\d+(?=\s+total)')
sed -i "s|$(cat README.md | grep -oP '\d+(?=\*\*$)')|$TOTAL_IPS|1" README.md
- name: Commit changes
run: |
git config --local user.email '[email protected]'
git config --local user.name 'touhidurrr'
git add ipv?_list.txt cidr?.txt README.md
git commit -m 'Updated Lists [Automated]'
git pull
git push
- name: Check diff
run: git diff HEAD~1..HEAD