Skip to content

Commit

Permalink
Add condition to run job only on pull request failure events
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Sep 26, 2024
1 parent 445be02 commit cec3f51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/genai-investigator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cec3f51

Please sign in to comment.