Skip to content

Commit

Permalink
Merge pull request #12 from mozilla-it/add-failed-message-type
Browse files Browse the repository at this point in the history
Added "failed" message type to slack action
  • Loading branch information
dlactin authored Aug 30, 2023
2 parents 653cc95 + 5a992c1 commit 1e64853
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion slack/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ inputs:
required: true
type: string
type:
description: Message type to be sent, supported values 'start', 'end', 'custom'
description: Message type to be sent, supported values 'start', 'end', 'failed', 'custom'
required: true
type: string
channel_id:
Expand Down Expand Up @@ -109,6 +109,34 @@ runs:
}
]
},
"failed": {
"attachments": [
{
"color": "#a72841",
"fallback": "${{ inputs.app_name }} ${{ inputs.env_name }}: failed",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ inputs.app_name }} ${{ inputs.env_name }}: Deploy failed - ${{ inputs.ref }}"
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": "Github Actions",
"emoji": true
},
"value": "click",
"url": "${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}",
"action_id": "button-action"
}
}
]
}
]
},
"custom": {
"attachments": [
{
Expand Down

0 comments on commit 1e64853

Please sign in to comment.