[INFRA] Adding a GitHub action to comment community PRs. #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Community contribution" | |
on: | |
pull_request: | |
types: [ 'opened', 'reopened' ] | |
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 }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Print repo URLs" | |
run: | | |
echo "EUI: ${{ env.EUI_REPO }}" | |
echo "Head: ${{ env.HEAD_REPO }}" | |
- name: "Add community comment" | |
# Assume forked repo PR if these URLs are not the same | |
if: ${{ env.EUI_REPO != env.HEAD_REPO }} | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
message: | | |
Since this is a community submitted pull request, a Buildkite build has not been kicked off automatically. Would an Elastic organization member please verify the contents of this patch and then kick off a build manually? | |
pr_number: ${{ env.PULL_REQUEST_NUMBER }} |