From 0d56a4b605a8a665eef1295cfca0f061a9b5ea1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Wed, 1 Jul 2020 11:58:41 +0200 Subject: [PATCH] feat: Added Slack deployment notifications --- .github/workflows/dev.yml | 15 ++++++++++++++- .github/workflows/prod.yml | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 15941db4e..2149c7409 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -44,4 +44,17 @@ jobs: task-definition: ${{ steps.task-def.outputs.task-definition }} service: app-dev cluster: dev - wait-for-service-stability: false + wait-for-service-stability: true + + notify_slack: + needs: deploy + + runs-on: ubuntu-latest + + steps: + - name: Notify slack + uses: pullreminders/slack-action@master + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + with: + args: '{ \"channel\": \"${{ secrets.SLACK_NOTIFICATION_CHANNEL }}\", \"blocks\": [{\"type\": \"section\", \"text\": {\"type\": \"mrkdwn\", \"text\": \"Successfully deployed \"}}, {\"type\": \"section\", \"text\": {\"type\": \"mrkdwn\", \"text\": \"Changes: \"}, \"accessory\": {\"type\": \"image\", \"image_url\": \"https://website-dev.standardnotes.org/assets/icon.png\", \"alt_text\": \"Standard Notes\"}}, { \"type\": \"section\", \"fields\": [{\"type\": \"mrkdwn\", \"text\": \"\"}]}]}' diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index 9874bc257..a5d24d67d 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -44,4 +44,17 @@ jobs: task-definition: ${{ steps.task-def.outputs.task-definition }} service: app-prod cluster: prod - wait-for-service-stability: false + wait-for-service-stability: true + + notify_slack: + needs: deploy + + runs-on: ubuntu-latest + + steps: + - name: Notify slack + uses: pullreminders/slack-action@master + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + with: + args: '{ \"channel\": \"${{ secrets.SLACK_NOTIFICATION_CHANNEL }}\", \"blocks\": [{\"type\": \"section\", \"text\": {\"type\": \"mrkdwn\", \"text\": \"Successfully deployed \"}}, {\"type\": \"section\", \"text\": {\"type\": \"mrkdwn\", \"text\": \"Changes: \"}, \"accessory\": {\"type\": \"image\", \"image_url\": \"https://website-dev.standardnotes.org/assets/icon.png\", \"alt_text\": \"Standard Notes\"}}, { \"type\": \"section\", \"fields\": [{\"type\": \"mrkdwn\", \"text\": \"\"}]}]}'