Files
shadowrocket-rule/.gitea/workflows/sync.yml

38 lines
1.0 KiB
YAML

name: Sync Shadowrocket Rules From GitHub
on:
schedule:
- cron: '0 */2 * * *' # 每 2 小时同步一次
workflow_dispatch: # 支持手动同步
jobs:
sync:
runs-on: ubuntu-22.04
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