-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jayasimha Raghavan
authored and
Jayasimha Raghavan
committed
Feb 3, 2024
1 parent
8152fcf
commit be98821
Showing
1 changed file
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,4 +104,48 @@ jobs: | |
else | ||
echo "$directory is not empty, custom legos are detected!" | ||
exit 1 | ||
fi | ||
fi | ||
|
||
- name: Notify on Slack (Success case) | ||
if: success() | ||
uses: slackapi/[email protected] | ||
with: | ||
# For posting a rich message using Block Kit | ||
channel-id: "${{ secrets.SLACK_CHANNEL_ID }}" | ||
payload: | | ||
{ | ||
"text": "GitHub Action build result: ${{ job.status }}", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": ":tada: Custom Docker Build Verification for ${{ steps.get_tag.outputs.current_tag }} successful " | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
|
||
- name: Notify on Slack (Failure case) | ||
if: failure() | ||
uses: slackapi/[email protected] | ||
with: | ||
# For posting a rich message using Block Kit | ||
channel-id: "${{ secrets.SLACK_CHANNEL_ID }}" | ||
payload: | | ||
{ | ||
"text": "GitHub Action build result: ${{ job.status }}", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": ":no-entry: Attention! Custom Docker Build Verification for ${{ steps.get_tag.outputs.current_tag }} Failed! " | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |