Skip to content

Commit b384cfc

Browse files
committed
added check user access step
1 parent 4837352 commit b384cfc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/terraform-apply.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ jobs:
1313
if: ${{ github.event.issue.pull_request && (contains(github.event.comment.body, '/test') || contains(github.event.comment.body, '/rc_test')) }}
1414

1515
steps:
16+
- name: Check User Access
17+
if: ${{ github.event.comment.author_association != 'OWNER' && github.event.comment.author_association != 'COLLABORATOR' }}
18+
run: |
19+
echo "User ${{ github.event.comment.user.login }} is not authorized to trigger this workflow."
20+
echo "User: ${{ github.event.comment.user.login }}"
21+
echo "Association: ${{ github.event.comment.author_association }}"
22+
exit 1
23+
1624
- name: Checkout
1725
uses: actions/checkout@v3
1826

0 commit comments

Comments
 (0)