Improve Slack notification (#11458)
* Improve Slack notification * Improve Slack notification * Improve Slack notification
This commit is contained in:
1 parent
8ecc7276ec
commit
22a3cbb97d
3 files changed
+11
-11
No files matched your search
@@ -45,14 +45,6 @@ jobs:
|
|||||||
python detect.py --weights ${{ matrix.model }}.onnx --img 320
|
python detect.py --weights ${{ matrix.model }}.onnx --img 320
|
||||||
python segment/predict.py --weights ${{ matrix.model }}-seg.onnx --img 320
|
python segment/predict.py --weights ${{ matrix.model }}-seg.onnx --img 320
|
||||||
python classify/predict.py --weights ${{ matrix.model }}-cls.onnx --img 224
|
python classify/predict.py --weights ${{ matrix.model }}-cls.onnx --img 224
|
||||||
- name: Notify on failure
|
|
||||||
if: failure() && github.repository == 'ultralytics/yolov5' && (github.event_name == 'schedule' || github.event_name == 'push')
|
|
||||||
uses: slackapi/slack-github-action@v1.23.0
|
|
||||||
with:
|
|
||||||
payload: |
|
|
||||||
{"text": "<!channel> GitHub Actions error for ${{ github.workflow }} ❌\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* ${{ github.event_name }}\n*Job Status:* ${{ job.status }}\n"}
|
|
||||||
env:
|
|
||||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }}
|
|
||||||
|
|
||||||
Tests:
|
Tests:
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
@@ -159,11 +151,17 @@ jobs:
|
|||||||
for path in '$m', '$b':
|
for path in '$m', '$b':
|
||||||
model = torch.hub.load('.', 'custom', path=path, source='local')
|
model = torch.hub.load('.', 'custom', path=path, source='local')
|
||||||
EOF
|
EOF
|
||||||
- name: Notify on failure
|
|
||||||
if: failure() && github.repository == 'ultralytics/yolov5' && (github.event_name == 'schedule' || github.event_name == 'push')
|
Summary:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [Benchmarks, Tests] # Add job names that you want to check for failure
|
||||||
|
if: always() # This ensures the job runs even if previous jobs fail
|
||||||
|
steps:
|
||||||
|
- name: Check for failure and notify
|
||||||
|
if: ${{ needs.Benchmarks.result == 'failure' || needs.Tests.result == 'failure' }} # Check if any of the jobs failed
|
||||||
uses: slackapi/slack-github-action@v1.23.0
|
uses: slackapi/slack-github-action@v1.23.0
|
||||||
with:
|
with:
|
||||||
payload: |
|
payload: |
|
||||||
{"text": "<!channel> GitHub Actions error for ${{ github.workflow }} ❌\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* ${{ github.event_name }}\n*Job Status:* ${{ job.status }}\n"}
|
{"text": "<!channel> GitHub Actions error for ${{ github.workflow }} ❌\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* ${{ github.event_name }}\n"}
|
||||||
env:
|
env:
|
||||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }}
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }}
|
||||||
@@ -6,6 +6,7 @@ name: "CodeQL"
|
|||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 1 * *' # Runs at 00:00 UTC on the 1st of every month
|
- cron: '0 0 1 * *' # Runs at 00:00 UTC on the 1st of every month
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ name: Publish Docker Images
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
|
|||||||
Reference in new issue
Block a user