Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit

Permalink
only notify on failure in main branch (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo authored Dec 16, 2020
1 parent 48fd72a commit b07e333
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
job_005:
name: Notify failure
runs-on: ubuntu-latest
if: failure()
if: "(github.event_name == 'push' || github.event_name == 'schedule') && failure()"
steps:
- run: |
curl -H "Content-Type: application/json" -X POST -d \
Expand Down
6 changes: 1 addition & 5 deletions mono_repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@ github:
CONFIG_DATA: ${{ secrets.CONFIG_DATA }}
SERVICE_ACCOUNT_JSON: ${{ secrets.SERVICE_ACCOUNT_JSON }}
on_completion:
# Example job that pings a web hook url stored in a github secret with a
# json payload linking to the failed run.
- name: "Notify failure"
runs-on: ubuntu-latest
# By default this job will only run if all dependent jobs are successful,
# but we want to run in the failure case for this purpose.
if: failure()
if: (github.event_name == 'push' || github.event_name == 'schedule') && failure()
steps:
- run: >
curl -H "Content-Type: application/json" -X POST -d \
Expand Down

0 comments on commit b07e333

Please sign in to comment.