forked from binary-com/deriv-api-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request binary-com#275 from jim-deriv/Jim/feq-1090/separat…
…e-docker-and-kubernetes-notification [FEQ] Jim/FEQ-1090/separate docker and kubernetes notification
- Loading branch information
Showing
2 changed files
with
57 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,20 @@ | ||
name: notify_slack | ||
description: Send Slack notifications | ||
description: Send Slack notification | ||
inputs: | ||
SLACK_WEBHOOK_URL: | ||
description: Slack webhook URL | ||
required: true | ||
STATUS: | ||
description: Job status | ||
MESSAGE: | ||
description: 'Status message' | ||
required: true | ||
RELEASE_TYPE: | ||
description: Release type | ||
required: true | ||
VERSION: | ||
description: Version | ||
required: true | ||
default: N/A | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Send Slack Notification on Success | ||
if: ${{ inputs.STATUS == 'success' }} | ||
- name: Send Slack Notification | ||
run: |- | ||
curl -X POST -H 'Content-type: application/json' \ | ||
--data '{ | ||
"text": "'"${{ inputs.RELEASE_TYPE }}"' Release succeeded for api.deriv.com with version *'"${{ inputs.VERSION }}"'*" | ||
"text": "${{ inputs.MESSAGE }}", | ||
}' \ | ||
${{ inputs.SLACK_WEBHOOK_URL }} | ||
shell: bash | ||
- name: Send Slack Notification on Failure | ||
if: ${{ inputs.STATUS == 'failure' }} | ||
run: |- | ||
curl -X POST -H 'Content-type: application/json' \ | ||
--data '{ | ||
"text": "'"${{ inputs.RELEASE_TYPE }}"' Release failed for api.deriv.com with version *'"${{ inputs.VERSION }}"'*" | ||
}' \ | ||
${{ inputs.SLACK_WEBHOOK_URL }} | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters