Skip to content

Commit

Permalink
Slack notificaiton github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
harshsinghvi committed Nov 18, 2023
1 parent d03a27f commit 95341cd
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,31 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/harshsinghvi/golang-postgres-kubernetes:latest
- name: Send custom JSON data to Slack workflow
id: slack
uses: slackapi/[email protected]
with:
# This data can be any valid JSON from a previous step in the GitHub Action
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 }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "🚀 go-todo-api image pushed"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

0 comments on commit 95341cd

Please sign in to comment.