Skip to content

update

update #10332

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: update
# Controls when the workflow will run
on:
schedule:
- cron: '0 */2 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
upd_rkn:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Installing dependencies
run: sudo apt-get install -y iprange
- name: Downloading RKN dump
run: curl -s -L https://raw.githubusercontent.com/zapret-info/z-i/master/dump.csv -o dump.csv
- name: Process RKN dump
run: cut -d";" -f1 dump.csv | tr '|' '\n' | tail -n +2 | sort -u > dump.txt
- name: Sort out Ipv4
run: grep '\.' dump.txt | sort -V > ip_all.lst
- name: Reduce Ipv4 list
run: iprange --ipset-reduce 0 ip_all.lst | awk '/\// {print $1 > net} !/\// {print $1 > ip}' "net=net.lst" "ip=ip.lst"
- name: Sort Ipv6
run: grep ':' dump.txt > ip6.lst
- name: Commit results
uses: EndBug/add-and-commit@v9
with:
author_name: Alexey Smirnov
author_email: [email protected]
message: 'Update IP lists'
add: '*.lst --force'