pull/1110/head
SengokuCola 2025-07-14 02:44:38 +08:00
commit 8a32ae8ab9
3 changed files with 9 additions and 4 deletions

View File

@ -4,7 +4,7 @@ on: [pull_request]
jobs: jobs:
conflict-check: conflict-check:
runs-on: self-hosted runs-on: [self-hosted, Windows, X64]
outputs: outputs:
conflict: ${{ steps.check-conflicts.outputs.conflict }} conflict: ${{ steps.check-conflicts.outputs.conflict }}
steps: steps:
@ -25,7 +25,7 @@ jobs:
} }
shell: pwsh shell: pwsh
labeler: labeler:
runs-on: self-hosted runs-on: [self-hosted, Windows, X64]
needs: conflict-check needs: conflict-check
if: needs.conflict-check.outputs.conflict == 'true' if: needs.conflict-check.outputs.conflict == 'true'
steps: steps:

View File

@ -2,7 +2,7 @@ name: Ruff PR Check
on: [ pull_request ] on: [ pull_request ]
jobs: jobs:
ruff: ruff:
runs-on: self-hosted runs-on: [self-hosted, Windows, X64]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:

View File

@ -7,13 +7,18 @@ on:
- dev - dev
- dev-refactor # 例如:匹配所有以 feature/ 开头的分支 - dev-refactor # 例如:匹配所有以 feature/ 开头的分支
# 添加你希望触发此 workflow 的其他分支 # 添加你希望触发此 workflow 的其他分支
workflow_dispatch: # 允许手动触发工作流
branches:
- main
- dev
- dev-refactor
permissions: permissions:
contents: write contents: write
jobs: jobs:
ruff: ruff:
runs-on: self-hosted runs-on: [self-hosted, Windows, X64]
# 关键修改:添加条件判断 # 关键修改:添加条件判断
# 确保只有在 event_name 是 'push' 且不是由 Pull Request 引起的 push 时才运行 # 确保只有在 event_name 是 'push' 且不是由 Pull Request 引起的 push 时才运行
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/pull/') if: github.event_name == 'push' && !startsWith(github.ref, 'refs/pull/')