Skip to content

Commit 9acc7fe

Browse files
committed
chore: add check for label to gate CI
Signed-off-by: Taylor Price <tayworm@gmail.com>
1 parent 5f6ab5e commit 9acc7fe

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/test.yaml

+12-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
paths-ignore:
77
- README.md
88
pull_request_target:
9+
types:
10+
- opened
11+
- synchronize
12+
- reopened
13+
- labeled
914
branches:
1015
- main
1116
paths-ignore:
@@ -15,6 +20,12 @@ jobs:
1520
check-perms:
1621
runs-on: ubuntu-latest
1722
steps:
23+
- uses: agilepathway/label-checker@v1.6.29
24+
id: label_check
25+
with:
26+
any_of: run_ci
27+
repo_token: ${{ secrets.GITHUB_TOKEN }}
28+
allow_failure: true
1829
- name: Get User Permission
1930
id: checkAccess
2031
uses: actions-cool/check-user-permission@v2
@@ -24,7 +35,7 @@ jobs:
2435
env:
2536
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2637
- name: Check User Permission
27-
if: steps.checkAccess.outputs.require-result == 'false'
38+
if: steps.checkAccess.outputs.require-result == 'false' || steps.label_check.outputs.label_check != 'success'
2839
run: |
2940
echo "${{ github.triggering_actor }} does not have permissions on this repo."
3041
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}"

0 commit comments

Comments
 (0)