Skip to content

Commit 0aa923d

Browse files
committed
added slack message to workflow
1 parent 59c8b86 commit 0aa923d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/slack-notify.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@ name: Slack Notification of CI Status
33
on:
44
push:
55
branches: ["feature/raisa-cicd"]
6+
pull_request:
7+
branches: ["feature/raisa-cicd"]
68

79
jobs:
810
slackNotification:
911
name: Slack CI status message
1012
runs-on: ubuntu-latest
13+
if: 'faiure'
1114
steps:
1215
- name: Slack Notify on Failure
1316
id: slack
1417
uses: slackapi/slack-github-action@v1.24.0
1518
with:
16-
status: ${{ job.status }}
19+
slack-message: "Github CI result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
1720
env:
1821
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
1922
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

0 commit comments

Comments
 (0)