Skip to content

Commit

Permalink
Change to markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
michalchecinski committed Nov 28, 2023
1 parent eaba2f1 commit 8b23f80
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions report-deployment-status-to-slack/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,32 @@ runs:
MESSAGE=""
case $EVENT in
"start")
echo "message=':loading: Updating ${{ inputs.environment }} to `${{ inputs.tag }}` on [${{ inputs.project }}](${{ inputs.url }}).'" >> $GITHUB_OUTPUT
echo "message=:loading: Updating ${{ inputs.environment }} to `${{ inputs.tag }}` on [${{ inputs.project }}](${{ inputs.url }})." >> $GITHUB_OUTPUT
;;
"success")
echo "message=':white_check_mark: Updated ${{ inputs.environment }} to `${{ inputs.tag }}` on ${{ inputs.project }}.'" >> $GITHUB_OUTPUT
echo "message=:white_check_mark: Updated ${{ inputs.environment }} to `${{ inputs.tag }}` on ${{ inputs.project }}." >> $GITHUB_OUTPUT
;;
"failure")
echo "message=':x: Failed to update ${{ inputs.environment }} to `${{ inputs.tag }}` on ${{ inputs.project }}.\nPlease retry or contact @devops team.'" >> $GITHUB_OUTPUT
echo "message=:x: Failed to update ${{ inputs.environment }} to `${{ inputs.tag }}` on ${{ inputs.project }}.\nPlease retry or contact @devops team." >> $GITHUB_OUTPUT
;;
esac
- name: Post to a Slack channel on ${{ inputs.event }}
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0
with:
channel-id: ${{ inputs.slack-channel }}
slack-message: ${{ steps.get-slack-message.outputs.message }}
payload: |
{
"text": "${{ steps.get-slack-message.outputs.message }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ steps.get-slack-message.outputs.message }}"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ steps.retrieve-slack-secrets.outputs.slack-bot-token }}

0 comments on commit 8b23f80

Please sign in to comment.