From f6ec2d60f37a64306c7055418c448b9126edab77 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2020 20:23:25 +0000 Subject: [PATCH 01/18] Bump nokogiri from 1.10.7 to 1.10.8 Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.10.8. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.10.8) Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a8c492c40..b23fe8381 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -96,9 +96,9 @@ GEM net-ssh (>= 2.6.5, < 6.0.0) net-ssh (5.2.0) nio4r (2.5.2) - nokogiri (1.10.7) + nokogiri (1.10.8) mini_portile2 (~> 2.4.0) - nokogiri (1.10.7-x64-mingw32) + nokogiri (1.10.8-x64-mingw32) mini_portile2 (~> 2.4.0) non-stupid-digest-assets (1.0.9) sprockets (>= 2.0) From 5f2191fb45fa31f71b3bfb7e6d1d9343be3ca67d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 May 2020 15:11:33 +0000 Subject: [PATCH 02/18] Bump puma from 4.3.1 to 4.3.5 Bumps [puma](https://github.com/puma/puma) from 4.3.1 to 4.3.5. - [Release notes](https://github.com/puma/puma/releases) - [Changelog](https://github.com/puma/puma/blob/master/History.md) - [Commits](https://github.com/puma/puma/commits) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a8c492c40..5c78c3e85 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -102,7 +102,7 @@ GEM mini_portile2 (~> 2.4.0) non-stupid-digest-assets (1.0.9) sprockets (>= 2.0) - puma (4.3.1) + puma (4.3.5) nio4r (~> 2.0) rack (2.1.2) rack-cors (1.1.1) From 2958d5f38918d6b7bea81ebdd68d9e732e2efb11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Jun 2020 11:57:16 +0000 Subject: [PATCH 03/18] Bump websocket-extensions from 0.1.3 to 0.1.4 Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4. - [Release notes](https://github.com/faye/websocket-extensions-node/releases) - [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md) - [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4) Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 74066a37b..a4358407b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12123,9 +12123,9 @@ } }, "websocket-extensions": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", "dev": true }, "which": { From e31b9aa50bdbc40d1c0eb28748de95a1ca409323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Tue, 9 Jun 2020 09:57:26 +0200 Subject: [PATCH 04/18] Add initial github actions setup for develop branch --- .github/workflows/dev.yml | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/dev.yml diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml new file mode 100644 index 000000000..8b26c0976 --- /dev/null +++ b/.github/workflows/dev.yml @@ -0,0 +1,47 @@ +name: Dev + +on: + push: + branches: [ develop ] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: standardnotes/web + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + tags: "latest,${{ github.sha }}" + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + + - name: Download task definition + run: | + aws ecs describe-task-definition --task-definition app-dev --query taskDefinition > task-definition.json + + - name: Fill in the new image ID in the Amazon ECS task definition + id: task-def + uses: aws-actions/amazon-ecs-render-task-definition@v1 + with: + task-definition: task-definition.json + container-name: app-dev + image: "standardnotes/app:${{ github.sha }}" + + - name: Deploy Amazon ECS task definition + uses: aws-actions/amazon-ecs-deploy-task-definition@v1 + with: + task-definition: ${{ steps.task-def.outputs.task-definition }} + service: app-dev + cluster: dev + wait-for-service-stability: true From e75a18e2bb2cba0133c0f4f672cc34b13f1b9f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Tue, 9 Jun 2020 10:23:43 +0200 Subject: [PATCH 05/18] Fix Docker image name in deployment --- .github/workflows/dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 8b26c0976..fe023623a 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -36,7 +36,7 @@ jobs: with: task-definition: task-definition.json container-name: app-dev - image: "standardnotes/app:${{ github.sha }}" + image: "standardnotes/web:${{ github.sha }}" - name: Deploy Amazon ECS task definition uses: aws-actions/amazon-ecs-deploy-task-definition@v1 From 5fa8798010afa9003a276f4741ce93fca04c5607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Wed, 10 Jun 2020 10:13:18 +0200 Subject: [PATCH 06/18] Add prod workflow for github actions --- .github/workflows/prod.yml | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/prod.yml diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml new file mode 100644 index 000000000..6aaffcdd3 --- /dev/null +++ b/.github/workflows/prod.yml @@ -0,0 +1,47 @@ +name: Prod + +on: + push: + branches: [ master ] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: standardnotes/web + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + tags: "stable,${{ github.sha }}" + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + + - name: Download task definition + run: | + aws ecs describe-task-definition --task-definition app-prod --query taskDefinition > task-definition.json + + - name: Fill in the new image ID in the Amazon ECS task definition + id: task-def + uses: aws-actions/amazon-ecs-render-task-definition@v1 + with: + task-definition: task-definition.json + container-name: app-prod + image: "standardnotes/web:${{ github.sha }}" + + - name: Deploy Amazon ECS task definition + uses: aws-actions/amazon-ecs-deploy-task-definition@v1 + with: + task-definition: ${{ steps.task-def.outputs.task-definition }} + service: app-prod + cluster: prod + wait-for-service-stability: true From 0a58c31f11f9ff5911402db9f82700db9bdb1588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Wed, 17 Jun 2020 06:59:27 +0200 Subject: [PATCH 07/18] Add Health Check endpoint --- app/controllers/health_check_controller.rb | 5 +++++ config/environments/production.rb | 1 + config/routes.rb | 2 ++ 3 files changed, 8 insertions(+) create mode 100644 app/controllers/health_check_controller.rb diff --git a/app/controllers/health_check_controller.rb b/app/controllers/health_check_controller.rb new file mode 100644 index 000000000..7fa247be2 --- /dev/null +++ b/app/controllers/health_check_controller.rb @@ -0,0 +1,5 @@ +class HealthCheckController < ApplicationController + def index + render :plain => "OK" + end +end diff --git a/config/environments/production.rb b/config/environments/production.rb index 1a5ec07c5..946d60dcb 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -2,6 +2,7 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. config.force_ssl = true + config.ssl_options = { redirect: { exclude: -> request { request.path =~ /healthcheck/ } } } # Code is not reloaded between requests. config.cache_classes = true diff --git a/config/routes.rb b/config/routes.rb index 1697cb1b1..a62838c23 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,5 @@ Rails.application.routes.draw do + get "/healthcheck" => "health_check#index" + root 'application#app' end From 1b6dadd4f7901db92e2885a97dbca92908c56d72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Wed, 17 Jun 2020 07:03:07 +0200 Subject: [PATCH 08/18] Add precompiling assets --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3fa734d96..47d6f7317 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,8 +40,7 @@ RUN npm install RUN npm run build -# Uncomment the line below for production: -# RUN bundle exec rake assets:precompile +RUN bundle exec rake assets:precompile EXPOSE 3000 From c32785579c6a4700455aa3afd9ad51f344142581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Wed, 17 Jun 2020 07:12:18 +0200 Subject: [PATCH 09/18] Switch to fixed version of Ruby alpine --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 47d6f7317..ca7e08284 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ # Set up Nginx to terminate SSL with LetsEncrypt and proxy_pass to http://localhost:3000/ ### -FROM ruby:alpine +FROM ruby:2.7.1-alpine RUN apk add --update --no-cache \ alpine-sdk \ From a8f6932088b63900cb523afbee7921a88647c7ca Mon Sep 17 00:00:00 2001 From: Johnny Almonte Date: Wed, 17 Jun 2020 11:25:20 -0400 Subject: [PATCH 10/18] chore: move ionicons assets to vendor --- .../assets/fonts/ionicons}/ionicons.eot | Bin .../assets/fonts/ionicons}/ionicons.svg | 0 .../assets/fonts/ionicons}/ionicons.ttf | Bin .../assets/fonts/ionicons}/ionicons.woff | Bin 4 files changed, 0 insertions(+), 0 deletions(-) rename {app/assets/fonts => vendor/assets/fonts/ionicons}/ionicons.eot (100%) rename {app/assets/fonts => vendor/assets/fonts/ionicons}/ionicons.svg (100%) rename {app/assets/fonts => vendor/assets/fonts/ionicons}/ionicons.ttf (100%) rename {app/assets/fonts => vendor/assets/fonts/ionicons}/ionicons.woff (100%) diff --git a/app/assets/fonts/ionicons.eot b/vendor/assets/fonts/ionicons/ionicons.eot similarity index 100% rename from app/assets/fonts/ionicons.eot rename to vendor/assets/fonts/ionicons/ionicons.eot diff --git a/app/assets/fonts/ionicons.svg b/vendor/assets/fonts/ionicons/ionicons.svg similarity index 100% rename from app/assets/fonts/ionicons.svg rename to vendor/assets/fonts/ionicons/ionicons.svg diff --git a/app/assets/fonts/ionicons.ttf b/vendor/assets/fonts/ionicons/ionicons.ttf similarity index 100% rename from app/assets/fonts/ionicons.ttf rename to vendor/assets/fonts/ionicons/ionicons.ttf diff --git a/app/assets/fonts/ionicons.woff b/vendor/assets/fonts/ionicons/ionicons.woff similarity index 100% rename from app/assets/fonts/ionicons.woff rename to vendor/assets/fonts/ionicons/ionicons.woff From 864cc414ea9b6449334b8420e70640e75a3993c7 Mon Sep 17 00:00:00 2001 From: Johnny Almonte Date: Wed, 17 Jun 2020 11:32:30 -0400 Subject: [PATCH 11/18] fix: update assets paths --- app/assets/stylesheets/_ionicons.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/_ionicons.scss b/app/assets/stylesheets/_ionicons.scss index bda8c265c..e217629e8 100644 --- a/app/assets/stylesheets/_ionicons.scss +++ b/app/assets/stylesheets/_ionicons.scss @@ -13,8 +13,8 @@ */ @font-face { font-family: "Ionicons"; - src: url("../fonts/ionicons.eot?v=2.0.0"); - src: url("../fonts/ionicons.eot?v=2.0.1#iefix") format("embedded-opentype"), url("../fonts/ionicons.ttf?v=2.0.1") format("truetype"), url("../fonts/ionicons.woff?v=2.0.1") format("woff"), url("../fonts/ionicons.svg?v=2.0.1#Ionicons") format("svg"); + src: url("/assets/fonts/ionicons.eot?v=2.0.0"); + src: url("/assets/fonts/ionicons.eot?v=2.0.1#iefix") format("embedded-opentype"), url("/assets/fonts/ionicons.ttf?v=2.0.1") format("truetype"), url("/assets/fonts/ionicons.woff?v=2.0.1") format("woff"), url("/assets/fonts/ionicons.svg?v=2.0.1#Ionicons") format("svg"); font-weight: normal; font-style: normal; } From 43e16203ddf604bd6f177e6de428727cc8b0eefe Mon Sep 17 00:00:00 2001 From: Johnny Almonte Date: Wed, 17 Jun 2020 11:34:12 -0400 Subject: [PATCH 12/18] fix: precompiling font assets --- config/initializers/assets.rb | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 1d686d7e3..cac5fd170 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -9,7 +9,7 @@ Rails.application.config.assets.version = '1.0' Rails.application.config.assets.paths << Rails.root.join('vendor', 'assets') Rails.application.config.assets.paths << Rails.root.join('dist') -Rails.application.config.assets.precompile << ["*.svg", "*.eot", "*.woff", "*.ttf"] +Rails.application.config.assets.precompile += %w( fonts/ionicons.eot fonts/ionicons.svg fonts/ionicons.ttf fonts/ionicons.woff ) # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. diff --git a/package.json b/package.json index fd47140cc..92bf422e5 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "scripts": { "start": "webpack-dev-server --progress", "bundle": "webpack --mode production", - "build": "bundle install && npm install && npm run bundle", + "build": "bundle install && npm install && bundle exec rails assets:precompile && npm run bundle", "submodules": "git submodule update --init --force --remote", "test": "karma start karma.conf.js --single-run", "lint": "eslint --fix app/assets/javascripts/**/*.js" From 8aaaf31bd485c9ecf3f9c6d13c71f1ba09016d1d Mon Sep 17 00:00:00 2001 From: Johnny Almonte Date: Wed, 17 Jun 2020 21:46:13 -0400 Subject: [PATCH 13/18] fix: use npm ci --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 92bf422e5..8514b6256 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "scripts": { "start": "webpack-dev-server --progress", "bundle": "webpack --mode production", - "build": "bundle install && npm install && bundle exec rails assets:precompile && npm run bundle", + "build": "bundle install && npm ci && bundle exec rails assets:precompile && npm run bundle", "submodules": "git submodule update --init --force --remote", "test": "karma start karma.conf.js --single-run", "lint": "eslint --fix app/assets/javascripts/**/*.js" From dd426cf0a0984d4c8fdef7b2c85aadea1ede36c9 Mon Sep 17 00:00:00 2001 From: Johnny Almonte Date: Wed, 17 Jun 2020 21:46:42 -0400 Subject: [PATCH 14/18] refactor: remove duplicate commands --- Dockerfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index ca7e08284..5b12e1d40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,14 +34,8 @@ COPY . /app/ # Leave RAILS_SERVE_STATIC_FILES commented if Nginx/Apache will serve static files instead of rails. ### -RUN bundle install - -RUN npm install - RUN npm run build -RUN bundle exec rake assets:precompile - EXPOSE 3000 ENTRYPOINT [ "./docker/entrypoint" ] From 964c6f135794ff6b65c0a9dea6ab7e788cece96b Mon Sep 17 00:00:00 2001 From: Ningsong Shen Date: Tue, 23 Jun 2020 15:17:33 -0400 Subject: [PATCH 15/18] fix: update CSP to allow action bar to download notes --- config/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index 754c27ab6..ebbcc7664 100644 --- a/config/application.rb +++ b/config/application.rb @@ -43,7 +43,7 @@ module StandardNotes base_uri: %w('self'), block_all_mixed_content: false, # see http://www.w3.org/TR/mixed-content/ child_src: ["*", "blob:"], - frame_src: ["*", "blob:"], + frame_src: ["*", "blob:", "data:"], connect_src: ["*"], font_src: %w(* 'self'), form_action: %w('self'), From 4dbf879f873cfea56bb6e8f9599bcf6453a60961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Wed, 24 Jun 2020 11:09:49 +0200 Subject: [PATCH 16/18] Remove waiting for service stability after ECS deployment --- .github/workflows/dev.yml | 2 +- .github/workflows/prod.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index fe023623a..15941db4e 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -44,4 +44,4 @@ jobs: task-definition: ${{ steps.task-def.outputs.task-definition }} service: app-dev cluster: dev - wait-for-service-stability: true + wait-for-service-stability: false diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index 6aaffcdd3..9874bc257 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -44,4 +44,4 @@ jobs: task-definition: ${{ steps.task-def.outputs.task-definition }} service: app-prod cluster: prod - wait-for-service-stability: true + wait-for-service-stability: false From 80b4b530ee05f2b874ac22ffa7a3862ad818ce1e Mon Sep 17 00:00:00 2001 From: Ningsong Shen Date: Wed, 24 Jun 2020 15:09:35 -0400 Subject: [PATCH 17/18] fix: add flag to sandbox so that action bar can save notes in chrome --- app/assets/templates/directives/component-view.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/templates/directives/component-view.pug b/app/assets/templates/directives/component-view.pug index 59a8a388d..610e2ab02 100644 --- a/app/assets/templates/directives/component-view.pug +++ b/app/assets/templates/directives/component-view.pug @@ -89,7 +89,7 @@ iframe( ng-attr-id='component-iframe-{{ctrl.component.uuid}}', ng-if='ctrl.component && ctrl.componentValid', ng-src='{{ctrl.getUrl() | trusted}}', - sandbox='allow-scripts allow-top-navigation-by-user-activation allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-modals allow-forms' + sandbox='allow-scripts allow-top-navigation-by-user-activation allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-modals allow-forms allow-downloads' ) | Loading .loading-overlay(ng-if='ctrl.loading') 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 18/18] 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\": \"\"}]}]}'