mirror of
https://github.com/Toperlock/sing-box-geosite.git
synced 2025-06-08 01:32:17 +08:00
Update sync.yml
This commit is contained in:
parent
b22f55aa2b
commit
3ec4052c24
19
.github/workflows/sync.yml
vendored
19
.github/workflows/sync.yml
vendored
@ -13,6 +13,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: "Setup sing-box"
|
||||||
|
env:
|
||||||
|
SING_BOX_DEB_URL: "https://github.com/SagerNet/sing-box/releases/download/v1.8.0-rc.7/sing-box_1.8.0-rc.7_linux_amd64.deb"
|
||||||
|
run: |
|
||||||
|
set -Eeuo pipefail
|
||||||
|
wget -O sing-box.deb $SING_BOX_DEB_URL
|
||||||
|
sudo dpkg -i sing-box.deb
|
||||||
- name: Set up Python3
|
- name: Set up Python3
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
@ -29,5 +36,13 @@ jobs:
|
|||||||
git config --global user.email "action@github.com"
|
git config --global user.email "action@github.com"
|
||||||
git config --global user.name "GitHub Action"
|
git config --global user.name "GitHub Action"
|
||||||
git add ./rule/*.json
|
git add ./rule/*.json
|
||||||
git commit -m "Add JSON files"
|
git add ./rule/*.srs
|
||||||
git push
|
|
||||||
|
# 检查是否有文件被修改
|
||||||
|
if git diff --staged --quiet; then
|
||||||
|
echo "No changes to commit"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
git commit -m "Update rules"
|
||||||
|
git push
|
||||||
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user