Skip to content

Commit

Permalink
Create slack_integration.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
drewoldag authored Oct 2, 2023
1 parent 55a3ce3 commit ad66a07
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/slack_integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI for Template

on:
workflow_dispatch:

jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Send custom JSON data to Slack workflow
id: slack
uses: slackapi/[email protected]
with:
# For posting a rich message using Block Kit
payload: |
{
"text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

0 comments on commit ad66a07

Please sign in to comment.