perf: 优化获取节点时的检查和报错提示 #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .github/workflows/build.yml | |
| name: build_script | |
| on: | |
| push: | |
| branches: ['main'] | |
| paths: | |
| - 'src/**' | |
| - 'build.js' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v6 | |
| - name: setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| - name: run build script | |
| run: node build.js | |
| - name: commit and push changes | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add Script/mihomoScript.js | |
| git diff --cached --quiet || (git commit -m "build: 更新脚本" && git push) |