From 0b861816c761931ded1eafe90b0c24f6319ffe8c Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 5 Oct 2024 00:53:33 +0200 Subject: [PATCH] Update docker.yaml to notify on failure once (#16700) --- .github/workflows/docker.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 8a3d41a91a..4eef6d3123 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -173,8 +173,13 @@ jobs: docker push $t fi - - name: Notify on failure - if: github.event_name == 'push' && failure() # do not notify on cancelled() as cancelling is performed by hand + notify: + runs-on: ubuntu-latest + needs: docker + if: always() # This ensures the job always runs + steps: + - name: Check for failure and notify + if: needs.docker.result == 'failure' && github.repository == 'ultralytics/ultralytics' && github.event_name == 'push' uses: slackapi/slack-github-action@v1.27.0 with: payload: |