Skip to content

Build rules dat files #6

Build rules dat files

Build rules dat files #6

Workflow file for this run

name: Build rules dat files
on:
workflow_dispatch:
schedule:
- cron: "30 22 * * *" # 6:30 AM UTC+8
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: boluomimohesa/sing-rules-dat
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Convert bm7-rule-set to sing-rule-set
run: |
mkdir -p ./sing-rule/bm7
cp ./resouces/bm7.sh ./sing-rule/bm7/
cd ./sing-rule/bm7
wget https://github.com/SagerNet/sing-box/releases/download/v1.8.0-alpha.1/sing-box-1.8.0-alpha.1-linux-amd64.tar.gz -O sing-box.tar.gz && tar zxvf sing-box.tar.gz && mv sing-box-1.8.0-alpha.1-linux-amd64/sing-box ./ && rm -r sing-box-1.8.0-alpha.1-linux-amd64
ls
chmod 755 bm7.sh && ./bm7.sh
rm -r bm7.sh sing-box* rule
- name: Git push assets to "sing-rule" branch
run: |
cd sing-rule || exit 1
ls
git init
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b sing
git add .
git commit -m "Released on ${{ env.BUILDTIME }}"
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
git push -f -u origin sing