Fix Slack notifications on scheduled CI failure (#22012)

Co-authored-by: Jing Qiu <61612323+Laughing-q@users.noreply.github.com>
This commit is contained in:
Lakshantha Dissanayake 2025-09-11 00:04:28 -07:00 committed by GitHub
parent c81383c32f
commit af3bf33653
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -419,11 +419,7 @@ jobs:
if: always()
steps:
- name: Check for failure and notify
if: >
github.repository == 'ultralytics/ultralytics' &&
(github.event_name == 'schedule' || github.event_name == 'push') &&
github.run_attempt == '1' &&
(failure() || cancelled())
if: (needs.HUB.result == 'failure' || needs.Benchmarks.result == 'failure' || needs.Tests.result == 'failure' || needs.GPU.result == 'failure' || needs.RaspberryPi.result == 'failure' || needs.NVIDIA_Jetson.result == 'failure' || needs.Conda.result == 'failure' ) && github.repository == 'ultralytics/ultralytics' && (github.event_name == 'schedule' || github.event_name == 'push') && github.run_attempt == '1'
uses: slackapi/slack-github-action@v2.1.1
with:
webhook-type: incoming-webhook