Skip to content

Checkout PR merge branch and not master [DI-336] #34

Checkout PR merge branch and not master [DI-336]

Checkout PR merge branch and not master [DI-336] #34

Workflow file for this run

name: Builder
on:
pull_request_target:
jobs:
check_for_membership:
runs-on: ubuntu-latest
name: Check PR author membership
outputs:
check-result: ${{ steps.composite.outputs.check-result }}
steps:
- name: Action for membership check
id: composite
uses: hazelcast/hazelcast-tpm/membership@main
with:
organization-name: 'hazelcast'
member-name: ${{ github.actor }}
token: ${{ secrets.GH_TOKEN }}
pr-builder:
runs-on: ubuntu-latest
needs: check_for_membership
steps:
- name: Detect untrusted community PR
if: ${{ needs.check_for_membership.outputs.check-result == 'false' }}
run: |
echo "::error::ERROR: Untrusted external PR. Must be reviewed and executed by Hazelcast" 1>&2;
exit 1
- uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: maven
- name: Build and test
run: |
${RUNNER_DEBUG:+set -x}
mvn \
--batch-mode \
--errors \
--no-transfer-progress \
${RUNNER_DEBUG:+--show-version} \
"-Dhazelcast.enterprise.license.key=${{ secrets.HAZELCAST_ENTERPRISE_KEY_V7 }}" \
package