Skip to content

Commit

Permalink
Add markdown conversion for custom status messages
Browse files Browse the repository at this point in the history
  • Loading branch information
modalkonform authored and L0RD-ZER0 committed Mar 22, 2024
1 parent f9bd531 commit 72c987e
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 72c987e

Please sign in to comment.