Skip to content

Commit

Permalink
add slack notify to two CI actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ryichando committed Jan 15, 2025
1 parent 8c5c7fb commit f5bbe4d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ on:
- base

env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
REGISTRY: ghcr.io

jobs:
build-image:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -49,3 +51,16 @@ jobs:
MODE=compiled
IMAGE=${{ env.REGISTRY }}/${{ github.repository }}-base:latest
tags: ${{ env.REGISTRY }}/${{ github.repository }}-compiled:latest

notify_failure:
runs-on: ${{ github.event.inputs.runner }}
needs: build-image
if: ${{ failure() }}
steps:

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.
16 changes: 15 additions & 1 deletion .github/workflows/getting-started.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
workflow_dispatch:

env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
DOCKER_IMAGE: nvidia/cuda:11.8.0-devel-ubuntu22.04
TMP_CONTAINER_NAME: tmp-ppf-dev
TMP_ROOT: /root/ppf-contact-solver
Expand Down Expand Up @@ -73,4 +74,17 @@ jobs:
if: always()
run: |
docker stop $TMP_CONTAINER_NAME
docker rm $TMP_CONTAINER_NAME
docker rm $TMP_CONTAINER_NAME
notify_failure:
runs-on: ${{ github.event.inputs.runner }}
needs: headless
if: ${{ failure() }}
steps:

- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.

0 comments on commit f5bbe4d

Please sign in to comment.