Skip to content

Commit 8074c72

Browse files
Update run.yml
1 parent 71d199f commit 8074c72

1 file changed

Lines changed: 56 additions & 19 deletions

File tree

.github/workflows/run.yml

Lines changed: 56 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ jobs:
5757
repository: cokebar/gfwlist2dnsmasq
5858
path: gfwlist2dnsmasq
5959

60+
- name: Checkout rootmelo92118/sing-geosite
61+
uses: actions/checkout@v6
62+
with:
63+
repository: rootmelo92118/sing-geosite
64+
path: sing-geosite
65+
6066
- name: Setup Go
6167
uses: actions/setup-go@v6
6268
with:
@@ -209,25 +215,6 @@ jobs:
209215
run: |
210216
install -p ./custom/publish/faticensor.txt ./publish/
211217
212-
- name: Git push assets to "release" branch
213-
run: |
214-
cd publish || exit 1
215-
git init
216-
git config --local user.name "github-actions[bot]"
217-
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
218-
git checkout -b release
219-
git add .
220-
git commit -m "${{ env.RELEASE_NAME }}"
221-
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
222-
git push -f -u origin release
223-
224-
- name: Purge jsdelivr CDN
225-
run: |
226-
cd publish || exit 1
227-
for file in $(ls); do
228-
curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@release/${file}"
229-
done
230-
231218
- name: Generate plaintext and Convert to the rules of AdGuard format
232219
run: |
233220
cd custom || exit 1
@@ -261,6 +248,7 @@ jobs:
261248
mkdir clash_Rule_Set
262249
sed -i 's/--outputdir/--outputpath/g' GenerateAndConvertForClash.py
263250
python3 GenerateAndConvertForClash.py ../community/data ./clash_Rule_Set
251+
264252
- name: Modify the head of FATIcensor
265253
run: |
266254
cd custom/clash_Rule_Set || exit 1
@@ -278,3 +266,52 @@ jobs:
278266
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
279267
git push -f -u origin clash
280268
rm -rf .git
269+
270+
- name: Generate sing-box RULE-SET format
271+
env:
272+
LOCAL_GEOSITE_PATH: ../publish/geosite.dat
273+
run: |
274+
cd sing-geosite || exit 1
275+
go run -v .
276+
277+
- name: Collect sing-box outputs and make sha256sum
278+
run: |
279+
mkdir -p sing-output
280+
cp -r sing-geosite/rule-set sing-output/
281+
cp -r sing-geosite/rule-set-unstable sing-output/
282+
sha256sum sing-geosite/geosite.db > sing-geosite/geosite.db.sha256sum
283+
sha256sum sing-geosite/geosite-cn.db > sing-geosite/geosite-cn.db.sha256sum
284+
cp sing-geosite/geosite* ./publish
285+
286+
- name: Git push assets to "sing-box" branch
287+
run: |
288+
cd sing-output || exit 1
289+
git init
290+
git config --local user.name "github-actions[bot]"
291+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
292+
git checkout -b clash
293+
git add *.yaml
294+
git commit -m "${{ env.RELEASE_NAME }}"
295+
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
296+
git push -f -u origin clash
297+
rm -rf .git
298+
299+
- name: Git push assets to "release" branch
300+
run: |
301+
cd publish || exit 1
302+
git init
303+
git config --local user.name "github-actions[bot]"
304+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
305+
git checkout -b release
306+
git add .
307+
git commit -m "${{ env.RELEASE_NAME }}"
308+
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
309+
git push -f -u origin release
310+
311+
- name: Purge jsdelivr CDN
312+
run: |
313+
cd publish || exit 1
314+
for file in $(ls); do
315+
curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@release/${file}"
316+
done
317+

0 commit comments

Comments
 (0)