Skip to content

Trigger end-to-end tests on external PR approval #26

Trigger end-to-end tests on external PR approval

Trigger end-to-end tests on external PR approval #26

name: Trigger end-to-end tests on external PR approval
on:
pull_request_review:
types: [submitted]
jobs:
test:
name: Trigger end-to-end tests
# If reviewed by a repo(/org) owner
if: |
github.event.pull_request.author_association != 'MEMBER'
&& github.event.review.author_association == 'MEMBER'
&& github.event.review.state == 'approved'
&& contains(github.event.review.body, '/e2e')
runs-on: ubuntu-latest
steps:
- name: Store PR number in a file
run: echo "PR_NUMBER=${PR_NUMBER}" > pr_number.txt
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
- name: Save artifact
uses: actions/upload-artifact@v4
with:
name: pr_number
path: pr_number.txt