mirror of
https://github.com/C24Be/AS_Network_List.git
synced 2026-01-25 15:31:12 +03:00
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
name: BlackLists updater
|
|
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PUSH }}
|
|
|
|
on:
|
|
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:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
name: 'BL/Update'
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # this is required to fetch all history for all branches and tags
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
- run: ./requirements.sh
|
|
- run: ./blacklists_updater.sh
|
|
- run: curl ifconfig.io
|
|
- run: |
|
|
timestamp=`date "+%Y-%m-%d_%H-%M-%S"`
|
|
git config --global user.name 'C24Be'
|
|
git config --global user.email 'c24be@github.com'
|
|
git status
|
|
git diff
|
|
git add blacklist*txt
|
|
git commit -m "Update blacklists: $timestamp"
|
|
git push https://${{ env.GITHUB_TOKEN }}@github.com/C24Be/AS_Network_List.git
|