Skip to content

Commit

Permalink
Add slack notifications on failed build
Browse files Browse the repository at this point in the history
Refs: OP-186
  • Loading branch information
liszkapawel authored Jul 31, 2023
1 parent 764827f commit 291dbb4
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,14 @@ jobs:
path: etc/build/
if-no-files-found: ignore

- name: Upload test log logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: Var logs
path: tests/Application/var/log/
if-no-files-found: ignore
- name: Failed build Slack notification
uses: rtCamp/action-slack-notify@v2
if: ${{ failure() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') }}
env:
SLACK_CHANNEL: ${{ secrets.FAILED_BUILD_SLACK_CHANNEL }}
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://github.com/rtCamp.png?size=48
SLACK_MESSAGE: ':x:'
SLACK_TITLE: Failed build on ${{ github.event.repository.name }} repository
SLACK_USERNAME: ${{ secrets.FAILED_BUILD_SLACK_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.FAILED_BUILD_SLACK_WEBHOOK }}

0 comments on commit 291dbb4

Please sign in to comment.