Skip to content

[INFRA] Building GitHub Action to comment on community PRs #2

[INFRA] Building GitHub Action to comment on community PRs

[INFRA] Building GitHub Action to comment on community PRs #2

name: "Community contribution"
on:
pull_request:
types: [ 'opened', 'edited' ] # Remove the 'edited' after you're ready to merge this
jobs:
# Add a comment to manually start Buildkite for community contributions
community-pr-message:
env:
EUI_REPO: ${{ github.event.pull_request.base.repo.url }}
HEAD_REPO: ${{ github.event.pull_request.head.repo.url }}
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
SUBMITTER_ASSOCIATION: ${{ github.event.pull_request.author_association }}
runs-on: ubuntu-latest
steps:
- name: "Test for community contribution"
if: ${{ env.EUI_REPO != env.HEAD_REPO }} && ${{ env.SUBMITTER_ASSOCIATION != 'MEMBER' }}
run: |
echo "This is a community submission."
- name: "Test for forked member contribution"
if: ${{ env.EUI_REPO != env.HEAD_REPO }} && ${{ env.SUBMITTER_ASSOCIATION == 'MEMBER' }}
run: |
echo "This is a forked member submission."