31 lines
828 B
YAML
31 lines
828 B
YAML
name: 'notify'
|
|
description: 'notify'
|
|
|
|
inputs:
|
|
result:
|
|
required: false
|
|
default: "failure"
|
|
type: string
|
|
name:
|
|
required: false
|
|
type: string
|
|
default: build
|
|
secrets:
|
|
required: false
|
|
type: string
|
|
|
|
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- uses: mattermost/action-mattermost-notify@master
|
|
env:
|
|
icons: '{"success" : ":white_check_mark:", "failure": ":x:", "canceled": ":facepalm:", "started": ":warning:"}'
|
|
with:
|
|
MATTERMOST_WEBHOOK_URL: ${{ fromJSON(inputs.secrets).MM_WEBHOOK_URL }}
|
|
PAYLOAD: |
|
|
{
|
|
"text": "${{ github.repository }} [${{inputs.name}}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}) was ${{ inputs.result }} by ${{ github.event.sender.login}} ${{ fromJson(env.icons)[inputs.result]}}"
|
|
}
|