diff --git a/.github/workflows/genai-investigator.yml b/.github/workflows/genai-investigator.yml index 7c4475e6fb..2986b4ad51 100644 --- a/.github/workflows/genai-investigator.yml +++ b/.github/workflows/genai-investigator.yml @@ -10,7 +10,9 @@ permissions: pull-requests: write jobs: check_failure: - if: ${{ github.event.workflow_run.conclusion == 'failure' }} + # Only run this job if the workflow run concluded with a failure + # and was triggered by a pull request event + if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'pull_request' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4