-
Notifications
You must be signed in to change notification settings - Fork 208
87 lines (80 loc) · 2.72 KB
/
pr_label_check.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: PR label check
# ℹ️ https://github.com/WordPress/openverse/blob/main/.github/GITHUB.md#pr-label-check
on:
pull_request:
types:
# Default types
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
- opened
- reopened
- synchronize
# Label is changed
- labeled
- unlabeled
jobs:
# Extract the current label list by group
get_label_groups:
name: Get label groups
runs-on: ubuntu-latest
outputs:
aspect: ${{ steps.get_groups.outputs.aspect }}
goal: ${{ steps.get_groups.outputs.goal }}
priority: ${{ steps.get_groups.outputs.priority }}
stack: ${{ steps.get_groups.outputs.stack }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get label groups
id: get_groups
env:
PYTHONPATH: ${{ github.workspace }}/automations/python
working-directory: automations/python/workflows
run: python get_label_groups.py
# List of aspect labels: https://github.com/WordPress/openverse/labels?q=aspect
check_aspect_label:
name: Check aspect label
runs-on: ubuntu-latest
needs:
- get_label_groups
steps:
- name: Check aspect label
uses: docker://agilepathway/pull-request-label-checker:v1.6.56
with:
any_of: ${{ needs.get_label_groups.outputs.aspect }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
# List of goal labels: https://github.com/WordPress/openverse/labels?q=goal
check_goal_label:
name: Check goal label
runs-on: ubuntu-latest
needs:
- get_label_groups
steps:
- name: Check goal label
uses: docker://agilepathway/pull-request-label-checker:v1.6.56
with:
one_of: ${{ needs.get_label_groups.outputs.goal }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
# List of priority labels: https://github.com/WordPress/openverse/labels?q=priority
check_priority_label:
name: Check priority label
runs-on: ubuntu-latest
needs:
- get_label_groups
steps:
- name: Check priority label
uses: docker://agilepathway/pull-request-label-checker:v1.6.56
with:
one_of: ${{ needs.get_label_groups.outputs.priority }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
# List of stack labels: https://github.com/WordPress/openverse/labels?q=stack
check_stack_label:
name: Check stack label
runs-on: ubuntu-latest
needs:
- get_label_groups
steps:
- name: Check stack label
uses: docker://agilepathway/pull-request-label-checker:v1.6.56
with:
any_of: ${{ needs.get_label_groups.outputs.stack }}
repo_token: ${{ secrets.GITHUB_TOKEN }}