101 lines
2.5 KiB
JSON
101 lines
2.5 KiB
JSON
{
|
|
"_metadata": {
|
|
"major_version": 2
|
|
},
|
|
"display_information": {
|
|
"name": "Slack GitHub Actions Builder",
|
|
"description": "Sharing the latest builds in channel"
|
|
},
|
|
"features": {
|
|
"app_home": {
|
|
"messages_tab_enabled": false
|
|
},
|
|
"bot_user": {
|
|
"display_name": "Slack GitHub Actions Builder"
|
|
}
|
|
},
|
|
"oauth_config": {
|
|
"scopes": {
|
|
"bot": ["chat:write", "chat:write.public"]
|
|
}
|
|
},
|
|
"settings": {
|
|
"org_deploy_enabled": true
|
|
},
|
|
"workflows": {
|
|
"build_outputs": {
|
|
"title": "Build outputs",
|
|
"description": "Write details of the most recent build",
|
|
"input_parameters": {
|
|
"properties": {
|
|
"errors": {
|
|
"type": "string"
|
|
},
|
|
"runner": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"task": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["errors", "runner", "status", "task"]
|
|
},
|
|
"steps": [
|
|
{
|
|
"id": "0",
|
|
"function_id": "slack#/functions/send_message",
|
|
"inputs": {
|
|
"channel_id": "C0123456789",
|
|
"message": [
|
|
{
|
|
"type": "rich_text",
|
|
"elements": [
|
|
{
|
|
"type": "rich_text_section",
|
|
"elements": [
|
|
{
|
|
"type": "text",
|
|
"text": "{{inputs.task}}: ",
|
|
"style": {
|
|
"bold": true
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"text": "{{inputs.status}}",
|
|
"style": {
|
|
"code": true
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "rich_text_quote",
|
|
"elements": [
|
|
{
|
|
"type": "text",
|
|
"text": "{{inputs.errors}} \n"
|
|
},
|
|
{
|
|
"type": "emoji",
|
|
"name": "robot_face"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"text": " {{inputs.runner}}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|