klip-sdk
Version:
JavaScript SDK to interact with klip App2App requests
58 lines (57 loc) • 1.96 kB
YAML
name: Slack message
author: Bolt Lee & Jeff Kim
description: 'Send message using slack'
inputs:
slack_webhook:
description: 'Need SLACK_WEBHOOK_URL'
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": "Staging Sign-off needs approval.",
"color": "#3AA3E3",
"text": "Staging Sign-off needs approval",
"fields": [
{
"title": "Branch",
"value": "${{ github.ref_name }}",
"short": true
},
{
"title": "Project",
"value": "${{ github.repository }}",
"short": true
},
{
"title": "Workflow name",
"value": "${{ github.workflow }}",
"short": true
},
{
"title": "Actor",
"value": "${{ github.actor }}",
"short": true
}
],
"actions": [
{
"type": "button",
"text": "Visit workflow",
"url" : "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ inputs.slack_webhook }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK