klip-sdk
Version:
JavaScript SDK to interact with klip App2App requests
56 lines • 1.79 kB
YAML
name: Slack message
author: Bolt Lee
description: 'Send message using slack'
inputs:
slack_webhook:
description: 'Need SLACK_WEBHOOK_URL'
required: true
default: ''
PR_URL:
description: ''
required: true
default: ''
runs:
using: "composite"
steps:
- name: Send custom JSON data to Slack workflow
id: slack
uses: slackapi/slack-github-action@v1.26.0
with:
payload: |
{
"attachments": [
{
"fallback": "Deploy production Sign-off needs approval.",
"color": "#3AA3E3",
"text": "Deploy production Sign-off needs approval.",
"fields": [
{
"title": "Branch",
"value": "${{ github.ref_name }}",
"short": true
},
{
"title": "Project",
"value": "${{ github.repository }}",
"short": true
},
{
"title": "Actor",
"value": "${{ github.actor }}",
"short": true
}
],
"actions": [
{
"type": "button",
"text": "Visit PR for prod deploy approval",
"url" : "${{ inputs.PR_URL }}"
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ inputs.slack_webhook }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK