-
Notifications
You must be signed in to change notification settings - Fork 165
41 lines (37 loc) · 1.17 KB
/
check-labels.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
name: Check Labels
on:
pull_request:
types: [opened, synchronize, labeled, unlabeled]
workflow_dispatch:
jobs:
devnet-pass:
name: devnet-pass
runs-on: ubuntu-latest
steps:
- name: Check for Required Label
run: |
echo "A"
REQUIRED_LABEL="devnet-pass"
echo "B"
PR_LABELS='${{ toJSON(github.event.pull_request.labels) }}'
echo "C"
if echo "${PR_LABELS}" | grep -q "\"name\":\"$REQUIRED_LABEL\""; then
echo "D1"
echo "Required label '$REQUIRED_LABEL' is present."
else:
echo "D2"
echo "Error: Required label '$REQUIRED_LABEL' is missing."
exit 1
testnet-pass:
name: testnet-pass
runs-on: ubuntu-latest
steps:
- name: Check for Required Label
run: |
REQUIRED_LABEL="testnet-pass"
PR_LABELS='${{ toJSON(github.event.pull_request.labels) }}'
if echo "$PR_LABELS" | grep -q "\"name\":\"$REQUIRED_LABEL\""; then
echo "Required label '$REQUIRED_LABEL' is present."
else:
echo "Error: Required label '$REQUIRED_LABEL' is missing."
exit 1