Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable repository_dispatcher trigger in functional test" #5640

Merged
merged 2 commits into from
Jun 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/functional-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ on:
- main
- features/*
- release/*
# Dispatch on external events
repository_dispatch:
types: [e2e-test]

env:
# Go version
GOVER: '^1.20'
Expand Down Expand Up @@ -79,6 +83,18 @@ jobs:
echo "CHECKOUT_REPO=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
echo "CHECKOUT_REF=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
- name: Set up checkout target (repository_dispatch)
if: github.event_name == 'repository_dispatch'
uses: actions/[email protected]
with:
github-token: ${{ secrets.GH_RAD_CI_BOT_PAT }}
script: |
const testPayload = context.payload.client_payload;
if (testPayload && testPayload.command === `ok-to-test`) {
echo "CHECKOUT_REPO=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
echo "CHECKOUT_REF=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
}
vinayada1 marked this conversation as resolved.
Show resolved Hide resolved
- name: Check out code
uses: actions/checkout@v3
with:
Expand Down