添加 .gitea/workflows/sync.yml
Some checks failed
Sync Shadowrocket Rules From GitHub / sync (push) Failing after 2m24s
Some checks failed
Sync Shadowrocket Rules From GitHub / sync (push) Failing after 2m24s
This commit is contained in:
37
.gitea/workflows/sync.yml
Normal file
37
.gitea/workflows/sync.yml
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user