refactor:重构状态管理逻辑以简化当前步骤处理和验证 #2495
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 |