refactor:简化执行和计划确认逻辑以支持更动态的步骤生成与执行 #2497
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
| name: pre-commit Checks | |
| on: [ push, pull_request ] | |
| jobs: | |
| pre-commit: | |
| # 添加条件判断,排除main分支的push事件 | |
| if: github.event_name != 'push' || github.ref != 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| - name: Install pre-commit | |
| run: pip install pre-commit | |
| - name: Run pre-commit | |
| run: pre-commit run --all-files |