Skip to content

Commit

Permalink
Add Slack notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
guineveresaenger committed Apr 25, 2023
1 parent 96a9c6a commit 550f77a
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,26 @@ runs:
arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository
build-root-directory: ./sdk/java
gradle-version: 7.4.1
- if: failure() && github.event_name == 'push'
name: Notify Slack
uses: 8398a7/action-slack@v3
with:
author_name: Failure in publishing SDK
fields: repo,commit,author,action
status: ${{ job.status }}
- name: Notify success
env:
SLACK_CHANNEL: provider-upgrade-status
SLACK_COLOR: "#00FF00"
SLACK_MESSAGE: |-
Publish succeeded :heart_decoration:
SLACK_TITLE: ${{ github.event.repository.name }} Publish result
SLACK_USERNAME: provider-bot
SLACK_WEBHOOK: ${{ env.SLACK_WEBHOOK_URL }}
SLACK_ICON_EMOJI: ":taco:"
uses: rtCamp/action-slack-notify@v2
- name: Notify failure
env:
SLACK_CHANNEL: provider-upgrade-status
SLACK_COLOR: "#FF0000"
SLACK_MESSAGE: |-
Publish failed :x:
SLACK_TITLE: ${{ github.event.repository.name }} upgrade result
SLACK_USERNAME: provider-bot
SLACK_WEBHOOK: ${{ env.SLACK_WEBHOOK_URL }}
SLACK_ICON_EMOJI: ":taco:"
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2

0 comments on commit 550f77a

Please sign in to comment.