Skip to content

Commit 82c7f7f

Browse files
authored
Merge pull request #54 from oslabs-beta/feature/raisa-cicd
Feature/raisa cicd
2 parents 5cc290e + 411e91e commit 82c7f7f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/slack-notify.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Slack Notification of CI Status
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
slackNotification:
11+
name: Slack CI status message
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Slack Notify on Failure
15+
if: ${{ failure() }}
16+
id: slack
17+
uses: slackapi/slack-github-action@v1.24.0
18+
with:
19+
channel-id: 'C067F896WG5'
20+
slack-message: "Github CI Result: ${{ job.status }}\nGithub PR/Commit URL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
21+
env:
22+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
23+
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
24+
# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

0 commit comments

Comments
 (0)