Skip to content

Commit 06e2cb1

Browse files
feat: Added the github actions to send the slack notifications (twilio#164)
* feat: Added the github actions to send the slack notifications * Update release.yml
1 parent ac25774 commit 06e2cb1

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/release.yml

+32
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@ on:
1212
description: 'HomeBrew prerelease'
1313
default: 'false'
1414
jobs:
15+
notify-start:
16+
name: Notify Release Started
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Slack Notification
21+
uses: rtCamp/action-slack-notify@v2
22+
env:
23+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
24+
SLACK_COLOR: "#36a64f"
25+
SLACK_USERNAME: CLI Release Bot
26+
SLACK_ICON_EMOJI: ":ship:"
27+
SLACK_TITLE: "Twilio Cli"
28+
SLACK_MESSAGE: 'Release Started :rocket:'
29+
MSG_MINIMAL: actions url
1530
test:
1631
runs-on: ubuntu-latest
1732
strategy:
@@ -104,3 +119,20 @@ jobs:
104119
BRANCH_NAME: ${{github.event.inputs.cli-branch}}
105120
REPO_NAME: twilio/twilio-cli
106121
INPUTS: '{ "change-log": ${{ toJSON(needs.update-api-specs.outputs.change-log) }}, "version-type": "${{needs.update-api-specs.outputs.version-type}}", "homebrew-branch": "${{github.event.inputs.homebrew-branch}}", "homebrew-prerelease": "${{github.event.inputs.homebrew-prerelease}}" }'
122+
notify-complete-fail:
123+
if: ${{ failure() || cancelled() }}
124+
needs: [ triggerCliWorkflow ]
125+
name: Notify Release Failed
126+
runs-on: ubuntu-latest
127+
steps:
128+
- uses: actions/checkout@v2
129+
- name: Slack Notification
130+
uses: rtCamp/action-slack-notify@v2
131+
env:
132+
SLACK_WEBHOOK: ${{ secrets.ALERT_SLACK_WEB_HOOK }}
133+
SLACK_COLOR: "#ff3333"
134+
SLACK_USERNAME: CLI Release Bot
135+
SLACK_ICON_EMOJI: ":ship:"
136+
SLACK_TITLE: "Twilio Cli-core"
137+
SLACK_MESSAGE: 'Release workflow Failed'
138+
MSG_MINIMAL: actions url

0 commit comments

Comments
 (0)