Trigger end-to-end tests on external PR approval #30
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: 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 |