ci(workflows): 分离Ruff的push和pull_request触发条件

将Ruff的触发条件从同时监听push和pull_request改为分别监听,以优化CI流程并减少不必要的构建
This commit is contained in:
墨梓柒
2025-04-20 01:04:43 +08:00
parent 6615a004dd
commit 6f03b29bd0
2 changed files with 10 additions and 1 deletions

9
.github/workflows/ruff-pr.yml vendored Normal file
View File

@@ -0,0 +1,9 @@
name: Ruff
on: [ pull_request ]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3

View File

@@ -1,5 +1,5 @@
name: Ruff name: Ruff
on: [ push, pull_request ] on: [ push ]
permissions: permissions:
contents: write contents: write