diff --git a/.github/workflows/test_trigger.yaml b/.github/workflows/test_trigger.yaml index 839e13a35..0df22d629 100644 --- a/.github/workflows/test_trigger.yaml +++ b/.github/workflows/test_trigger.yaml @@ -11,11 +11,11 @@ jobs: - name: Check repository run: | REPO_OWNER=$(echo "${{ github.repository }}" | cut -d '/' -f 1) - echo "IS_REPOSITORY=${[REPO_OWNER == 'MaximIntegratedAI'}}" >> $GITHUB_ENV + echo "IS_REPOSITORY=${{ REPO_OWNER == 'MaximIntegratedAI' }}" >> $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' + if: env.IS_REPOSITORY == 'true' && env.IS_DEVELOP_BRANCH == 'true' run: | PR_Branch=${{ github.event.pull_request.head.ref }} Repository=${{ github.repository }} @@ -27,10 +27,10 @@ jobs: echo "PR_Sha: $PR_Sha" - name: Dispatch event - if: env.IS_SPECIFIC_REPOSITORY == 'true' && env.IS_DEVELOP_BRANCH == 'true' + if: env.IS_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.repository }}","PR_Number": "${{ github.event.pull_request.number }}","PR_Sha": "${{ github.event.pull_request.head.sha }}" }' + -d '{"event_type": "repo-pull-request", "client_payload": {"PR_Branch": "${{ github.event.pull_request.head.ref }}", "Repository": "${{ github.repository }}","PR_Number": "${{ github.event.pull_request.number }}","PR_Sha": "${{ github.event.pull_request.head.sha }}" }}'