-
Notifications
You must be signed in to change notification settings - Fork 37
42 lines (35 loc) · 941 Bytes
/
update.yml
File metadata and controls
42 lines (35 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Update IP Lists
on:
schedule:
- cron: '0 */2 * * *'
workflow_dispatch:
jobs:
update-lists:
runs-on: self-hosted
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Clean up old artifacts
run: |
rm -f inbound.txt outbound.txt
find tables -name "*.txt" -type f -delete
- name: Run update script
run: python3 update_tables.py
- name: Commit and push changes
run: |
git config user.name "GitHub Action"
git config user.email "action@github.com"
git add .
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Auto-update IP blocklists and stats [$(date)]"
git pull --rebase
git push
fi