QATv2 updates, minor bug fixes #265
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: Trigger External Workflow | |
on: | |
pull_request_target: | |
types: [opened, edited, synchronize] | |
jobs: | |
trigger_dispatch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check repository | |
run: | | |
echo "IS_SPECIFIC_REPOSITORY=${{ github.repository == 'analogdevicesinc/ai8x-training' }}" >> $GITHUB_ENV | |
echo "IS_DEVELOP_BRANCH=${{ github.ref == 'refs/heads/develop' }}" >> $GITHUB_ENV | |
- name: Set up environment | |
if: env.IS_SPECIFIC_REPOSITORY == 'true' && env.IS_DEVELOP_BRANCH == 'true' | |
run: | | |
PR_Branch=${{ github.event.pull_request.head.ref }} | |
Repository=${{ github.event.pull_request.head.repo.full_name }} | |
PR_Number=${{ github.event.pull_request.number }} | |
PR_Sha=${{ github.event.pull_request.head.sha }} | |
echo "PR_Branch: $PR_Branch" | |
echo "Repository: $Repository" | |
echo "PR_Number: $PR_Number" | |
echo "PR_Sha: $PR_Sha" | |
- name: Dispatch event | |
if: env.IS_SPECIFIC_REPOSITORY == 'true' && env.IS_DEVELOP_BRANCH == 'true' | |
run: | | |
curl -X POST \ | |
-H "Authorization: Bearer ${{ secrets.REGRESSION_TEST }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
"https://api.github.com/repos/MaximIntegratedAI/ai8x-regression/dispatches" \ | |
-d '{"event_type": "repo-pull-request", "client_payload": {"PR_Branch": "${{ github.event.pull_request.head.ref }}", "Repository": "${{ github.event.pull_request.head.repo.full_name }}","PR_Number": "${{ github.event.pull_request.number }}","PR_Sha": "${{ github.event.pull_request.head.sha }}" }' |