Skip to content

Commit

Permalink
refactor: notify failure for Gradle library publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
stempler committed Oct 6, 2023
1 parent 0c044be commit 8610a52
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/gradle-library-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ jobs:
with:
gradle-tasks: 'clean check'
java-version: ${{ inputs.java-version }}
notify-failure: false
secrets: inherit
18 changes: 18 additions & 0 deletions .github/workflows/gradle-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
description: Java version to use for build
required: true
type: string
notify-failure:
default: true
type: boolean
secrets:
GH_PAT:
required: true
Expand Down Expand Up @@ -115,3 +118,18 @@ jobs:
annotate_only: true
detailed_summary: true
fail_on_failure: true # in case of critical security vulnerabilities

#
# Report build failure to Slack
#

# https://github.com/marketplace/actions/slack-notify-build
- name: Notify slack fail
if: ${{ inputs.notify-failure && failure() }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: build-failures
status: FAILED
color: danger

0 comments on commit 8610a52

Please sign in to comment.