forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (38 loc) · 1.56 KB
/
Copy pathadd_label_precommit.yml
File metadata and controls
38 lines (38 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Add label on pre-commit success
on:
workflow_run:
workflows: [pre-commit]
types: [requested, completed]
jobs:
add-label-on-pre-commit-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Add label
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['pre-commit-passed']
})
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
remove-label-on-pre-commit-not-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion != 'success' }}
steps:
- name: Remove label
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
github.rest.issues.removeLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['pre-commit passed']
})
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}