Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #451 from sandeep-deriv/sandeep/fix-ghworkflow-1
Browse files Browse the repository at this point in the history
chore: uncommented slack notification for staging
  • Loading branch information
sandeep-deriv authored Apr 3, 2024
2 parents e2c78f6 + 968f25b commit d2478d4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
8 changes: 6 additions & 2 deletions .github/actions/send_slack_notifications/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ inputs:
description: "Version"
required: true
default: "N/A"
app_url:
description: "App URL"
required: true
default: "https://bot.deriv.com/"
runs:
using: composite
steps:
Expand All @@ -22,11 +26,11 @@ runs:
uses: 'deriv-com/shared-actions/.github/actions/send_slack_notification@master'
with:
SLACK_WEBHOOK_URL: ${{ inputs.SLACK_WEBHOOK_URL }}
MESSAGE: ${{ inputs.RELEASE_TYPE }} Release succeeded for binary-bot with version ${{ inputs.VERSION }}
MESSAGE: ${{ inputs.RELEASE_TYPE }} Release succeeded for ${{ inputs.APP_URL }} with version ${{ inputs.VERSION }}

- name: Send Slack Notification on Failure
if: inputs.status == 'failure'
uses: 'deriv-com/shared-actions/.github/actions/send_slack_notification@master'
with:
SLACK_WEBHOOK_URL: ${{ inputs.SLACK_WEBHOOK_URL }}
MESSAGE: ${{ inputs.RELEASE_TYPE }} Release failed for binary-bot with version ${{ inputs.VERSION }}
MESSAGE: ${{ inputs.RELEASE_TYPE }} Release failed for ${{ inputs.APP_URL }} with version ${{ inputs.VERSION }}
3 changes: 2 additions & 1 deletion .github/workflows/release_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,5 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
status: ${{ env.WORKFLOW_CONCLUSION }}
release_type: Production
version: ${{ needs.release_production.outputs.RELEASE_VERSION}}
version: ${{ needs.release_production.outputs.RELEASE_VERSION }}
app_url: https://bot.deriv.com/
35 changes: 18 additions & 17 deletions .github/workflows/release_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,21 @@ jobs:
SERVICEACCOUNT_TOKEN: ${{ secrets.SERVICEACCOUNT_TOKEN }}
CA_CRT: ${{ secrets.CA_CRT }}
APP_VERSION: latest-staging
# send_slack_notification:
# if: always()
# needs: [release_staging]
# environment: Staging
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Conclusion
# uses: technote-space/workflow-conclusion-action@v3
# - name: Send Slack Notification
# uses: "./.github/actions/send_slack_notifications"
# with:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# status: ${{ env.WORKFLOW_CONCLUSION }}
# release_type: Staging
# version: 'latest-master'
send_slack_notification:
if: always()
needs: [release_staging]
environment: Staging
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Conclusion
uses: technote-space/workflow-conclusion-action@v3
- name: Send Slack Notification
uses: "./.github/actions/send_slack_notifications"
with:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
status: ${{ env.WORKFLOW_CONCLUSION }}
release_type: Staging
version: latest-master
app_url: https://staging-bot.deriv.com/

0 comments on commit d2478d4

Please sign in to comment.