Skip to content

Commit 0a7a68d

Browse files
committed
ci: exclude push events on main branch to prevent unnecessary checks
1 parent d839ae3 commit 0a7a68d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: pre-commit Checks
22
on: [ push, pull_request ]
33
jobs:
44
pre-commit:
5+
# 添加条件判断,排除main分支的push事件
6+
if: github.event_name != 'push' || github.ref != 'refs/heads/main'
57
runs-on: ubuntu-latest
68
steps:
79
- uses: actions/checkout@v5

0 commit comments

Comments
 (0)