Skip to content

Commit

Permalink
fix: notify
Browse files Browse the repository at this point in the history
  • Loading branch information
tsi committed Dec 31, 2023
1 parent 22044d2 commit 67903db
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 27 deletions.
40 changes: 26 additions & 14 deletions .github/workflows/release-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'edge'

jobs:
release-edge:
release:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -50,16 +50,28 @@ jobs:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}

# notify:
# runs-on: ubuntu-latest
# needs: ['release']
# if: always() && needs.release.result == 'success'
# steps:
# - name: Slack Notification - Deployment Success
# uses: rtCamp/[email protected]
# env:
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# SLACK_CHANNEL: 'widgets-releases'
# SLACK_COLOR: ${{ job.status }}
# SLACK_TITLE: 'Deployment succeeded'
# SLACK_MESSAGE: 'Success :rocket: cloudinary-video-player version ${{ github.event.inputs.package_version }} deployed successfully'
notify:
runs-on: ubuntu-latest
needs: ['release']
if: always() && needs.release.steps.release.outputs.release_created
steps:
- name: Slack Notification - Deployment Success
if: needs.release.result == 'success'
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ vars.FE_DEPLOYMENTS_SLACK_WEBHOOK }}
SLACK_CHANNEL: 'rnd-fe-releases'
SLACK_COLOR: ${{ job.status }}
SLACK_TITLE: 'Video Player ${{ needs.release.steps.release.outputs.tag_name }} Deployed'
SLACK_MESSAGE: 'Success :rocket: cloudinary-video-player version ${{ needs.release.steps.release.outputs.tag_name }} deployed successfully'
SLACK_FOOTER: 'Check it out at https://cloudinary.github.io/cloudinary-video-player/?ver=edge&min=true'

- name: Slack Notification - Deployment Failure
if: needs.release.result == 'failure'
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ vars.FE_DEPLOYMENTS_SLACK_WEBHOOK }}
SLACK_CHANNEL: 'rnd-fe-releases'
SLACK_COLOR: ${{ job.status }}
SLACK_TITLE: 'Video Player Deployment Failed'
SLACK_MESSAGE: ':alert: Failed to deploy cloudinary-video-player version ${{ needs.release.steps.release.outputs.tag_name }}'
38 changes: 25 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,28 @@ jobs:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}

# notify:
# runs-on: ubuntu-latest
# needs: ['release']
# if: always() && needs.release.result == 'success'
# steps:
# - name: Slack Notification - Deployment Success
# uses: rtCamp/[email protected]
# env:
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# SLACK_CHANNEL: 'widgets-releases'
# SLACK_COLOR: ${{ job.status }}
# SLACK_TITLE: 'Deployment succeeded'
# SLACK_MESSAGE: 'Success :rocket: cloudinary-video-player version ${{ github.event.inputs.package_version }} deployed successfully'
notify:
runs-on: ubuntu-latest
needs: ['release']
if: always() && needs.release.steps.release.outputs.release_created
steps:
- name: Slack Notification - Deployment Success
if: needs.release.result == 'success'
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ vars.FE_DEPLOYMENTS_SLACK_WEBHOOK }}
SLACK_CHANNEL: 'rnd-fe-releases'
SLACK_COLOR: ${{ job.status }}
SLACK_TITLE: 'Video Player ${{ needs.release.steps.release.outputs.tag_name }} Deployed'
SLACK_MESSAGE: 'Success :rocket: cloudinary-video-player version ${{ needs.release.steps.release.outputs.tag_name }} deployed successfully'
SLACK_FOOTER: 'Check it out at https://cloudinary.github.io/cloudinary-video-player/?ver=latest&min=true'

- name: Slack Notification - Deployment Failure
if: needs.release.result == 'failure'
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ vars.FE_DEPLOYMENTS_SLACK_WEBHOOK }}
SLACK_CHANNEL: 'rnd-fe-releases'
SLACK_COLOR: ${{ job.status }}
SLACK_TITLE: 'Video Player Deployment Failed'
SLACK_MESSAGE: ':alert: Failed to deploy cloudinary-video-player version ${{ needs.release.steps.release.outputs.tag_name }}'

0 comments on commit 67903db

Please sign in to comment.