Skip to content

Commit

Permalink
chore: update configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-deriv committed Sep 19, 2023
1 parent 2a1cdf2 commit ff90874
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 7 deletions.
6 changes: 0 additions & 6 deletions .github/actions/notify_slack/action.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/actions/publish_to_pages_production/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ runs:
using: composite
steps:
- name: Publish to cloudflare pages (production)
environment: Production
run: |-
cd public
npx wrangler pages publish . --project-name=deriv-static-content-pages --branch=main
Expand Down
38 changes: 38 additions & 0 deletions .github/actions/send_slack_notifications/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: send_slack_notifications
description: Send Slack notifications
inputs:
SLACK_WEBHOOK_URL:
description: 'Slack webhook URL'
required: true
status:
description: 'Job status'
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'
run: |-
curl -X POST -H 'Content-type: application/json' \
--data '{
"text": "'"${{ inputs.release_type }}"' Release succeeded for deriv-static-content with version *'"${{ inputs.version }}"'*"
}' \
$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 deriv-static-content with version *'"${{ inputs.version }}"'*"
}' \
$SLACK_WEBHOOK_URL
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/release_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
with:
target_branch: production
- uses: "./.github/actions/publish_to_pages_production"
- uses: "./.github/actions/notify_slack"
- uses: "./.github/actions/send_slack_notifications"

0 comments on commit ff90874

Please sign in to comment.