mirror of
https://github.com/darkclip/netlist.git
synced 2026-11-20 15:35:20 +08:00
update
This commit is contained in:
1 parent
d2d252cf39
commit
cc9d8b2a9c
1 file changed
@@ -1,61 +0,0 @@
|
||||
name: build-mosdns
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- '.github/workflows/build-mosdns.yml'
|
||||
schedule:
|
||||
- cron: '0 16 * * *'
|
||||
|
||||
jobs:
|
||||
build-mosdns:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
- name: Checkout reference branch
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: loyalsoldier/v2ray-rules-dat
|
||||
ref: release
|
||||
path: ref
|
||||
- name: Checkout target branch
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: mosdns
|
||||
path: target
|
||||
- name: Clean target branch
|
||||
continue-on-error: true
|
||||
run: rm target/*
|
||||
- name: Rebuild target branch
|
||||
run: |
|
||||
cp mosdns/config.yml target/config.yml
|
||||
./raydata.py ref/geoip.dat -c CN -o target/rule/chinaip.txt geoip
|
||||
./raydata.py ref/geosite.dat -c CN -o target/rule/chinasite.txt geosite --formatter mosdns/format.json
|
||||
./raydata.py ref/geosite.dat -c ALIBABA -o target/rule/chinasite.txt geosite --formatter mosdns/format.json
|
||||
./raydata.py ref/geosite.dat -c ALIBABACLOUD -o target/rule/chinasite.txt geosite --formatter mosdns/format.json
|
||||
./raydata.py ref/geosite.dat -c ALIYUN -o target/rule/chinasite.txt geosite --formatter mosdns/format.json
|
||||
mkdir target/tmp
|
||||
cd target
|
||||
tar -cf mosdns.tar tmp rule *.yml
|
||||
rm tmp rule *.yml -r
|
||||
- name: Push to target branch
|
||||
continue-on-error: true
|
||||
run: |
|
||||
cd target
|
||||
git config --global user.name "${GITHUB_ACTOR}"
|
||||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
||||
git add .
|
||||
git commit -m "update $(date +%Y-%m-%d)"
|
||||
git push -q
|
||||
Reference in new issue
Block a user