Skip to content

Commit b865852

Browse files
nishaatrJackPGreen
andauthored
Add PR membership check [DI-336] (#679)
Follow-up from #674 Add PR author check to block external PRs --------- Co-authored-by: Jack Green <[email protected]>
1 parent 9b0e407 commit b865852

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/builder.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,28 @@ on:
44
pull_request_target:
55

66
jobs:
7+
check_for_membership:
8+
runs-on: ubuntu-latest
9+
name: Check PR author membership
10+
outputs:
11+
check-result: ${{ steps.composite.outputs.check-result }}
12+
steps:
13+
- name: Action for membership check
14+
id: composite
15+
uses: hazelcast/hazelcast-tpm/membership@main
16+
with:
17+
organization-name: 'hazelcast'
18+
member-name: ${{ github.actor }}
19+
token: ${{ secrets.GH_TOKEN }}
720
pr-builder:
821
runs-on: ubuntu-latest
22+
needs: check_for_membership
923
steps:
24+
- name: Detect untrusted community PR
25+
if: ${{ needs.check_for_membership.outputs.check-result == 'false' }}
26+
run: |
27+
echo "::error::ERROR: Untrusted external PR. Must be reviewed and executed by Hazelcast" 1>&2;
28+
exit 1
1029
- name: Checkout Code
1130
uses: actions/checkout@v4
1231
- name: Set up Java

0 commit comments

Comments
 (0)