Skip to content

Update SPAM IP List #131

Update SPAM IP List

Update SPAM IP List #131

name: Update SPAM IP List
on:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight
workflow_dispatch:
jobs:
update-iplist:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Fetch IP List
run: |
curl -o abuseip.txt https://raw.githubusercontent.com/borestad/blocklist-abuseipdb/main/abuseipdb-s100-14d.ipv4
- name: Format IP List
run: |
grep -oP '^\d{1,3}(\.\d{1,3}){3}' abuseip.txt | jq -R -s -c 'split("\n") | map(select(. != ""))' > abuseip.json
- name: Commit changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add abuseip.json
git commit -m '[AUTO] Update spam IP list'
git push origin HEAD:${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}