Skip to content

Commit

Permalink
Update sync.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Toperlock authored Dec 31, 2023
1 parent b22f55a commit 3ec4052
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ jobs:

steps:
- 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
uses: actions/setup-python@v2
with:
Expand All @@ -29,5 +36,13 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git add ./rule/*.json
git commit -m "Add JSON files"
git push
git add ./rule/*.srs
# 检查是否有文件被修改
if git diff --staged --quiet; then
echo "No changes to commit"
exit 0
else
git commit -m "Update rules"
git push
fi

0 comments on commit 3ec4052

Please sign in to comment.