-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (33 loc) · 1.04 KB
/
v2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Generate rules v2
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 5'
jobs:
deploy:
name: Generate rules v2 for Dnsmasq/SwitchyOmega/Clash
runs-on: ubuntu-latest
env:
AccessToken: ${{secrets.COMMIT_SECRET}}
DeployKey: ${{secrets.ACTIONS_DEPLOY_KEY}}
steps:
- uses: actions/checkout@v3
- name: Init repo
shell: bash
run: |
git config --local user.name "GitHub Action"
git config --local user.email "[email protected]"
- name: Commit and push files
shell: bash
env:
Branch: list
Origin2: accelerated-domains2.china.conf
Clash2: accelerated-domains2.china.yml
SwitchyOmega2: accelerated-domains2.china.sorl
run: |
git fetch --no-tags --prune --no-recurse-submodules --depth=1 origin $Branch
git checkout --force -B $Branch refs/remotes/origin/$Branch
sh ./gen2.sh
git add $Origin2 $Clash2 $SwitchyOmega2
git commit -m "$(date +%F)"
git push origin $Branch