fix(ci): skip labeler for fork pull requests (#281)

Fork PRs 缺少写权限导致 actions/labeler 失败,跳过 label job 解决误红
This commit is contained in:
狼哥
2026-04-20 00:16:28 +08:00
committed by GitHub
parent 9444cfecc6
commit 56b3150e4c

View File

@@ -10,6 +10,9 @@ permissions:
jobs:
label:
# Fork PRs do not get a write-capable GITHUB_TOKEN under pull_request,
# so actions/labeler would fail with "Resource not accessible by integration".
if: ${{ !github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v6