mirror of
https://github.com/C24Be/AS_Network_List.git
synced 2026-01-25 23:35:41 +03:00
Automate blacklist updater
This commit is contained in:
24
.github/workflows/bl.yml
vendored
24
.github/workflows/bl.yml
vendored
@@ -5,13 +5,22 @@ name: BlackLists updater
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
# At 00:00 on the first day of the month
|
||||||
|
#- cron: '0 0 1 * *'
|
||||||
|
# At 00:00 on Sunday
|
||||||
|
#- cron: '0 0 * * 0'
|
||||||
|
# At 00:00 every day
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
# Every hour
|
||||||
|
#- cron: '0 * * * *'
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: 'Blacklists/update'
|
name: 'BL/Update'
|
||||||
|
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
@@ -26,6 +35,13 @@ jobs:
|
|||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
- run: pip install -r requirements.txt
|
- run: pip install -r requirements.txt
|
||||||
- run: ./blacklists_updater.sh
|
- run: ./blacklists_updater.sh
|
||||||
- run: cat blacklist*txt
|
- run: |
|
||||||
- run: git diff
|
curl ifconfig.io
|
||||||
- run: git status
|
timestamp=`date "+%Y-%m-%d_%H-%M-%S"`
|
||||||
|
git config --global user.name 'github-actions'
|
||||||
|
git config --global user.email 'github-actions@github.com'
|
||||||
|
git status
|
||||||
|
git diff
|
||||||
|
git add blacklist*txt
|
||||||
|
git commit -m "Update blacklists: $timestamp"
|
||||||
|
git push
|
||||||
|
|||||||
Reference in New Issue
Block a user