From d2f292ad8da1d1d06adc5f9a0b5db3ce42a50134 Mon Sep 17 00:00:00 2001 From: Shashank Sinha Date: Thu, 22 Feb 2024 21:25:07 +0530 Subject: [PATCH] CBDEVOPS-478 enable slack notification for prod deployment (#414) --- .github/workflows/build-deploy.yml | 9 +++++++++ .github/workflows/create-github-release.yml | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index e64715b..2f98f0d 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -31,6 +31,7 @@ jobs: name: ${{ needs.set_environment.outputs.my_env }}-release steps: - name: Generate Heroku Config + id: set_heroku_config run: | cat < ~/.netrc machine api.heroku.com @@ -41,5 +42,13 @@ jobs: password ${{ secrets.HEROKU_API_TOKEN }} EOF - name: release scaffold + id: release_scaffold run: | heroku config:set REACT_NATIVE_SCAFFOLD_REPO_BRANCH=$GITHUB_REF_NAME -a ${{ secrets.HEROKU_APP }} + - uses: act10ns/slack@v2 + if: ${{ needs.set_environment.outputs.my_env }} == 'production' + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + with: + status: ${{ job.status }} + steps: ${{ toJson(steps) }} diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml index 17a4dbf..f6434e3 100644 --- a/.github/workflows/create-github-release.yml +++ b/.github/workflows/create-github-release.yml @@ -40,4 +40,5 @@ jobs: working-directory: ${{ env.working-directory }} GIT_TOKEN: ${{ secrets.GIT_TOKEN }} JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }} - release_branch: ${{ github.event.client_payload.release_branch }} \ No newline at end of file + release_branch: ${{ github.event.client_payload.release_branch }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file