Skip to content

Commit

Permalink
fix: skip status on non-PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
dnlopes committed Jul 20, 2024
1 parent 041ae4e commit becabeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ jobs:
commenter_exitcode: ${{ steps.plan_or_apply.outputs.exitcode }}

- name: Set status success
if: ${{ success() || inputs.IgnoreErrors == true }}
if: ${{ success() || inputs.IgnoreErrors == true && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -212,7 +212,7 @@ jobs:
-f "context=${{ env.CHECK_NAME }}"
- name: Set status failure
if: ${{ failure() && inputs.IgnoreErrors == false }}
if: ${{ failure() && inputs.IgnoreErrors == false && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down

0 comments on commit becabeb

Please sign in to comment.