Skip to content

Commit 2d836e2

Browse files
wip
1 parent 005f803 commit 2d836e2

3 files changed

Lines changed: 44 additions & 12 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
types: [labeled]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
15+
jobs:
16+
test-label:
17+
if: github.event.label.name == 'test-robot-done'
18+
name: Job
19+
uses: ./.github/workflows/test-label.yaml
20+
with:
21+
label-test-robot-done: test-robot-done

.github/workflows/pull-request.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: PR
22

33
on:
44
pull_request:
5-
types: [opened, synchronize, reopened, labeled]
5+
types: [opened, synchronize, reopened]
66

77
concurrency:
88
group: ${{ github.workflow }}-${{ github.ref }}
@@ -15,17 +15,6 @@ permissions:
1515

1616
jobs:
1717
test-label:
18-
if: github.event.label.name == 'test-robot-done'
19-
name: Test Label
20-
runs-on: ubuntu-latest
21-
steps:
22-
- uses: actions/checkout@v4
23-
24-
- name: Test Label Added
25-
uses: ./.github/actions/test-label
26-
with:
27-
label-test-robot-done: test-robot-done
28-
2918
test-unlabel:
3019
if: github.event.action == 'synchronize'
3120
name: Test Unlabel

.github/workflows/test-label.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Test Label
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
label-test-robot-done:
7+
description: 'Label name indicating the PR has been test-robot-done'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
test-label:
13+
if: github.event.label.name == 'test-robot-done'
14+
name: Test Label
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Test Label Added
20+
uses: ./.github/actions/test-label
21+
with:
22+
label-test-robot-done: ${{ inputs.label-test-robot-done }}

0 commit comments

Comments
 (0)