commit 2555f2c10d95ff9d2ce6232865f95c8fb3bbd7b2 Author: starsswp Date: Sun Nov 23 14:22:01 2025 +0000 添加 .gitea/workflows/sync.yml diff --git a/.gitea/workflows/sync.yml b/.gitea/workflows/sync.yml new file mode 100644 index 0000000..da87f43 --- /dev/null +++ b/.gitea/workflows/sync.yml @@ -0,0 +1,37 @@ +name: Sync Shadowrocket Rules From GitHub + +on: + schedule: + - cron: '0 */2 * * *' # 每 2 小时同步一次 + workflow_dispatch: # 支持手动同步 + +jobs: + sync: + runs-on: ubuntu-latest + + steps: + - name: Checkout Gitea repo + uses: actions/checkout@v4 + + - name: Download sr_direct_list.module + run: | + curl -L \ + https://raw.githubusercontent.com/GMOogway/shadowrocket-rules/master/sr_direct_list.module \ + -o sr_direct_list.module + + - name: Download sr_proxy_list.module + run: | + curl -L \ + https://raw.githubusercontent.com/GMOogway/shadowrocket-rules/master/sr_proxy_list.module \ + -o sr_proxy_list.module + + - name: Commit changes + run: | + git config user.name "gitea-bot" + git config user.email "bot@gitea.local" + git add sr_direct_list.module sr_proxy_list.module + git commit -m "sync: update shadowrocket rules from GitHub" || true + + - name: Push changes + run: | + git push origin HEAD