[CI] remove auto-labeling run-ci label. (#13486)

This commit is contained in:
Liangsheng Yin
2025-11-18 14:59:46 +08:00
committed by GitHub
parent 67071f55a8
commit 4e41edcb9c
3 changed files with 11 additions and 29 deletions

View File

@@ -12,34 +12,9 @@ jobs:
label:
runs-on: ubuntu-latest
steps:
# Step 1: Add category labels based on file changes
- name: Auto-label by file changes
uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
sync-labels: false
# Step 2: Add run-ci label for authorized users (only on opened/reopened)
- name: Check user permission
if: github.event.action == 'opened' || github.event.action == 'reopened'
id: checkAccess
uses: actions-cool/check-user-permission@v2
with:
require: write
username: ${{ github.triggering_actor }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Add run-ci label
if: (github.event.action == 'opened' || github.event.action == 'reopened') && steps.checkAccess.outputs.require-result == 'true'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_PAT_FOR_PULL_REQUEST }}
script: |
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['run-ci']
})

View File

@@ -10,7 +10,7 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'run-ci')
if: contains(github.event.pull_request.labels.*.name)
steps:
- uses: actions/checkout@v4