Skip to content

update-list

update-list #1414

Workflow file for this run

name: update-list
on:
pull_request:
push:
branches:
- main
schedule:
- cron: "0 */3 * * *" # UTC
jobs:
update-list:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
# DOWNLOAD GRAYNOISE IP LIST SSH, SSH WORM, IOT SCANNER and URLTABLE
- name: Setup wget
run: |
rm ip-list.txt
rm -rf blocklist
mkdir blocklist
wget -i urltable -P blocklist/ --wait 7
- name: Merge
run: |
cd blocklist
cat * >> output
sed -i 's/#.*//' output
sed -i 's/;.*//' output
sed -i 's/\[//g; s/\]//g' output
cat -n output | sort -uk2 | sort -nk1 | cut -f2- > ip-list.txt
cd ..
cp blocklist/ip-list.txt .
rm -rf blocklist
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply update-list changes