-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.81 KB
/
Copy pathbuild.yml
File metadata and controls
47 lines (39 loc) · 1.81 KB
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
40
41
42
43
44
45
46
47
name: Build
on:
push:
branches: [ 'master' ]
pull_request:
branches: [ 'master' ]
workflow_dispatch:
schedule:
- cron: '0 * * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update Router List
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master'
run: |
sh ./ClashX/rule_providers/ad_block/gen_ad_block_list.sh ./ClashX/rule_providers/ad_block/
sh ./Script/gen_clash_anycast_list.sh > ClashX/rule_providers/anycast.yaml
sh ./Script/gen_cloudfront_list.sh > ClashX/rule_providers/cloudfront.yaml
sh ./Script/gen_quantmultx_anycast_list.sh > QuantmultX/Filter/Anycast.list
sh ./Script/gen_china_asn_router_list.sh > QuantmultX/Filter/China_ASN_router.list
- name: Update AS IP Range List
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master'
run: |
sh ./ClashX/rule_providers/as_ip_range/AS714/gen_as714.sh > ./ClashX/rule_providers/as_ip_range/AS714/as714_ipcidr.yaml
sh ./ClashX/rule_providers/as_ip_range/AS8075/gen_as8075.sh > ./ClashX/rule_providers/as_ip_range/AS8075/as8075_ipcidr.yaml
- name: Commit update
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master'
run: |
git config user.name github-actions
git config user.email github-actions@github.com
if [[ -n $(git status --porcelain) ]]; then
git add .
git commit -m "update $(date +%Y-%m-%d)"
git push -q
else
echo "No changes to commit."
fi