Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add markdown conversion for custom status messages #172

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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