Skip to content

Commit

Permalink
Only run github action slack notification on push to main branch
Browse files Browse the repository at this point in the history
Currently the slack notification posts in #capi-fail anytime pull requests fail github actions as well. This is noisy, as we frequently have draft PRs and automated dependency bump PRs that do not pass github actions.

[#180955330]
  • Loading branch information
sweinstein22 authored Jan 26, 2022
1 parent b7eab8f commit 719f170
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Run Rubocop
run: bundle exec rake rubocop
- uses: ravsamhq/[email protected]
if: always()
if: github.event_name == 'push'
with:
status: ${{ job.status }}
notify_when: 'failure' # default is 'success,failure,warnings'
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Run tests
run: DB=postgres bundle exec rake spec:all
- uses: ravsamhq/[email protected]
if: always()
if: github.event_name == 'push'
with:
status: ${{ job.status }}
notify_when: 'failure' # default is 'success,failure,warnings'
Expand All @@ -58,7 +58,7 @@ jobs:
- name: Run tests
run: DB=mysql bundle exec rake spec:all
- uses: ravsamhq/[email protected]
if: always()
if: github.event_name == 'push'
with:
status: ${{ job.status }}
notify_when: 'failure' # default is 'success,failure,warnings'
Expand All @@ -77,7 +77,7 @@ jobs:
- name: Run tests
run: DB=mysql MYSQL_CONNECTION_PREFIX=mysql2://root:root@localhost:3306 bundle exec rake spec:all
- uses: ravsamhq/[email protected]
if: always()
if: github.event_name == 'push'
with:
status: ${{ job.status }}
notify_when: 'failure' # default is 'success,failure,warnings'
Expand All @@ -98,7 +98,7 @@ jobs:
- name: Run docs tests
run: bundle exec rake check_doc_links
- uses: ravsamhq/[email protected]
if: always()
if: github.event_name == 'push'
with:
status: ${{ job.status }}
notify_when: 'failure' # default is 'success,failure,warnings'
Expand Down

0 comments on commit 719f170

Please sign in to comment.