Skip to content

Commit 9ca3056

Browse files
move the failure outside of the comment step to clarify failures
1 parent 99b5767 commit 9ca3056

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

.github/workflows/silabs-require-admin-action-check.yaml

+14-14
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ jobs:
2323
${{ contains(github.event.pull_request.labels.*.name,
2424
'sl-require-admin-action') }}
2525
steps:
26-
- name: Check for sl-require-admin-action label
27-
run:
28-
echo "The sl-require-admin-action label is present. Failing
29-
the job."
30-
env:
31-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
3226
- name: Add comment to PR
3327
uses: actions/github-script@v6
3428
with:
@@ -49,7 +43,13 @@ jobs:
4943
body: comment,
5044
});
5145
}
52-
process.exit(1);
46+
47+
- name: Check for sl-require-admin-action label
48+
run: |
49+
echo "The sl-require-admin-action label is present. Failing the job."
50+
process.exit(1);
51+
env:
52+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
5353

5454
prevent-label-removal:
5555
name: Prevent sl-require-admin-action label removal
@@ -58,12 +58,6 @@ jobs:
5858
github.event.action == 'unlabeled' && github.event.label.name ==
5959
'sl-require-admin-action'
6060
steps:
61-
- name: Prevent sl-require-admin-action label removal
62-
run:
63-
echo "The sl-require-admin-action label cannot be removed.
64-
Failing the job."
65-
env:
66-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
6761
- name: Add comment to PR
6862
uses: actions/github-script@v6
6963
with:
@@ -84,4 +78,10 @@ jobs:
8478
body: comment,
8579
});
8680
}
87-
process.exit(1);
81+
82+
- name: Prevent sl-require-admin-action label removal
83+
run: |
84+
echo "The sl-require-admin-action label cannot be removed. Failing the job."
85+
process.exit(1);
86+
env:
87+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)