-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add markdown conversion for custom status messages
- Loading branch information
1 parent
f9bd531
commit 72c987e
Showing
1 changed file
with
27 additions
and
3 deletions.
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 |
---|---|---|
|
@@ -4,17 +4,41 @@ author: 'rtCamp' | |
runs: | ||
using: 'composite' | ||
steps: | ||
- name: "Slack-Markdown Conversion" | ||
- name: "Slack-Markdown Message Conversion" | ||
if: env.SLACKIFY_MARKDOWN == 'true' | ||
id: slackify | ||
id: slackify_message | ||
uses: LoveToKnow/[email protected] | ||
with: | ||
text: ${{ env.SLACK_MESSAGE }} | ||
|
||
- name: "Slack-Markdown Success Message Conversion" | ||
if: env.SLACKIFY_MARKDOWN == 'true' | ||
id: slackify_success_message | ||
uses: LoveToKnow/[email protected] | ||
with: | ||
text: ${{ env.SLACK_MESSAGE_ON_SUCCESS }} | ||
|
||
- name: "Slack-Markdown Failure Message Conversion" | ||
if: env.SLACKIFY_MARKDOWN == 'true' | ||
id: slackify_failure_message | ||
uses: LoveToKnow/[email protected] | ||
with: | ||
text: ${{ env.SLACK_MESSAGE_ON_FAILURE }} | ||
|
||
- name: "Slack-Markdown Cancel Message Conversion" | ||
if: env.SLACKIFY_MARKDOWN == 'true' | ||
id: slackify_cancel_message | ||
uses: LoveToKnow/[email protected] | ||
with: | ||
text: ${{ env.SLACK_MESSAGE_ON_CANCEL }} | ||
|
||
- name: "Slack Notification (Formatted)" | ||
if: env.SLACKIFY_MARKDOWN == 'true' | ||
env: | ||
SLACK_MESSAGE: "${{ steps.slackify.outputs.text }}" | ||
SLACK_MESSAGE: "${{ steps.slackify_message.outputs.text }}" | ||
SLACK_MESSAGE_ON_SUCCESS: "${{ steps.slackify_success_message.outputs.text }}" | ||
SLACK_MESSAGE_ON_FAILURE: "${{ steps.slackify_failure_message.outputs.text }}" | ||
SLACK_MESSAGE_ON_CANCEL: "${{ steps.slackify_cancel_message.outputs.text }}" | ||
GITHUB_RUN: "${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}" | ||
ENABLE_ESCAPES: "true" | ||
uses: "docker://ghcr.io/rtcamp/action-slack-notify:v2.3.0" | ||
|