mirror of
https://github.com/C24Be/AS_Network_List.git
synced 2026-01-25 15:31:12 +03:00
Automate blacklist updater
This commit is contained in:
13
.github/workflows/bl.yml
vendored
13
.github/workflows/bl.yml
vendored
@@ -39,14 +39,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: '3.12'
|
||||||
- run: ./requirements.sh
|
- run: ./requirements.sh
|
||||||
- run: curl ifconfig.io -q
|
- run: curl -s ifconfig.io
|
||||||
- run: ./blacklists_updater.sh
|
- run: ./blacklists_updater.sh
|
||||||
- run: |
|
- run: |
|
||||||
timestamp=`date "+%Y.%m.%d %H:%M:%S"`
|
timestamp=`date "+%Y.%m.%d %H:%M:%S"`
|
||||||
git config --global user.name "${{ env.REPO_OWNER }}"
|
git config --global user.name "${{ env.REPO_OWNER }}"
|
||||||
git config --global user.email "${{ env.REPO_OWNER }}@github.com"
|
git config --global user.email "${{ env.REPO_OWNER }}@github.com"
|
||||||
git status
|
|
||||||
git diff
|
|
||||||
git add blacklist*txt
|
git add blacklist*txt
|
||||||
git commit -m "Update $timestamp"
|
git diff --staged --exit-code || echo "No changes to commit"
|
||||||
git push https://${{ env.GH_PAT }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}.git
|
if [ $? -ne 0 ]; then
|
||||||
|
git commit -m "Update $timestamp"
|
||||||
|
git push https://${{ env.GH_PAT }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}.git
|
||||||
|
else
|
||||||
|
echo "No changes to commit"
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user