File tree 1 file changed +36
-0
lines changed 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Check Required Labels
2
+ on :
3
+ pull_request :
4
+ types : [opened, synchronize, labeled, unlabeled]
5
+
6
+ workflow_dispatch :
7
+
8
+ jobs :
9
+ devnet-pass :
10
+ name : Tested successfully on devnet
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Check for Required Label
14
+ run : |
15
+ REQUIRED_LABEL="devnet-pass"
16
+ PR_LABELS="${{ toJSON(github.event.pull_request.labels) }}"
17
+
18
+ if echo "$PR_LABELS" | grep -q "\"name\":\"$REQUIRED_LABEL\""; then
19
+ echo "Required label '$REQUIRED_LABEL' is present."
20
+ else:
21
+ echo "Error: Required label '$REQUIRED_LABEL' is missing."
22
+ exit 1
23
+ testnet-pass :
24
+ name : Tested successfully on testnet
25
+ runs-on : ubuntu-latest
26
+ steps :
27
+ - name : Check for Required Label
28
+ run : |
29
+ REQUIRED_LABEL="testnet-pass"
30
+ PR_LABELS="${{ toJSON(github.event.pull_request.labels) }}"
31
+
32
+ if echo "$PR_LABELS" | grep -q "\"name\":\"$REQUIRED_LABEL\""; then
33
+ echo "Required label '$REQUIRED_LABEL' is present."
34
+ else:
35
+ echo "Error: Required label '$REQUIRED_LABEL' is missing."
36
+ exit 1
You can’t perform that action at this time.
0 commit comments