Skip to content

Commit

Permalink
add slack notification
Browse files Browse the repository at this point in the history
Signed-off-by: Leclerc Clement <[email protected]>
  • Loading branch information
clementleclercRTE committed Nov 19, 2024
1 parent 50c8bb4 commit 7a218b7
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/snapshot-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -281,21 +281,28 @@ jobs:
echo "=========================="
#SLACK NOTIFICATION ON FAILURE
- name: Read Build Status
if: failure()
id: build_status
run: echo "BUILD_STATUS_CONTENT=$(cat $BUILD_STATUS)" >> $GITHUB_OUTPUT

- name: Slack Notification
uses: 8398a7/action-slack@v3
if: failure()
with:
status: ${{ job.status }}
fields: repo,message,action,eventName,ref,workflow
text: |
:x: *Échec du workflow ${{ github.workflow }}
:x: *Échec du workflow ${{ github.workflow }}*
*Workflow:* ${{ github.workflow }}
*Job:* ${{ github.job }}
*Détails:*
${{ BUILD_STATUS }}
*Détails du build:*
```
${{ steps.build_status.outputs.BUILD_STATUS_CONTENT }}
```
Voir les logs :
(https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
env:
Expand Down

0 comments on commit 7a218b7

Please sign in to comment.