-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Check Required Labels | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, labeled, unlabeled] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
devnet-pass: | ||
name: Tested successfully on devnet | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check for Required Label | ||
run: | | ||
REQUIRED_LABEL="devnet-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 | ||
testnet-pass: | ||
name: Tested successfully on testnet | ||
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 |