File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Update CIDR Lists
2+
3+ on :
4+ schedule :
5+ - cron : " 0 0 * * *"
6+ push :
7+ branches : [ "main" ]
8+
9+ workflow_dispatch :
10+
11+ jobs :
12+ update :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+
19+ - name : Fetch Telegram CIDR List
20+ run : |
21+ curl -s "https://core.telegram.org/resources/cidr.txt" > Telegram-CIDR.rsc
22+ # Additional processing steps (Converting to .rsc format)
23+ sed -nEi 's/(([0-9]+\.){3}[0-9]+) */add list=Telegram address=\1/p' Telegram-CIDR.rsc
24+ sed -i '1 i\\/ip firewall address-list' Telegram-CIDR.rsc
25+
26+ - name : Fetch Whatsapp CIDR List
27+ run : |
28+ curl -s "https://raw.githubusercontent.com/HybridNetworks/whatsapp-cidr/main/WhatsApp/whatsapp_cidr_ipv4.txt" > Whatsapp-CIDR.rsc
29+ # From a project by HybridNetworks: https://github.com/HybridNetworks/whatsapp-cidr?tab=readme-ov-file
30+ # Additional processing steps (Converting to .rsc format)
31+ sed -nEi 's/(([0-9]+\.){3}[0-9]+) */add list=Whatsapp address=\1/p' Whatsapp-CIDR.rsc
32+ sed -i '1 i\\/ip firewall address-list' Whatsapp-CIDR.rsc
33+ # Add more steps to process the data and commit changes
34+
35+ - name : Commit and Push
36+ run : |
37+ git config --global user.email $GIT_EMAIL
38+ git config --global user.name $GIT_NAME
39+ git add .
40+ git commit -m "Update CIDR lists"
41+ git push
You can’t perform that action at this time.
0 commit comments