Skip to content

Update IP Blocklists #7446

Update IP Blocklists

Update IP Blocklists #7446

Workflow file for this run

name: Update IP Blocklists
on:
pull_request:
push:
branches:
- main
schedule:
- cron: "0 */2 * * *"
workflow_dispatch:
jobs:
update-list:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
# This step is now simplified. For PRs, it correctly checks out a merge commit.
# This avoids the confusion caused by `ref: ${{ github.head_ref }}`.
uses: actions/checkout@v4
- name: remove old files
run: |
rm -f ip-list.txt
rm -f inbound.txt
rm -f outbound.txt
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: '**/requirements.txt'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run update script
run: python update_tables.py
- name: Commit and push if changed
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: Update IP blocklists"
file_pattern: "inbound.txt outbound.txt ip-list.txt README.md"