From 38738810860bc67782d61fb69141715e7b09b69a Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Fri, 5 Nov 2021 13:49:01 -0600 Subject: [PATCH 1/2] Only post to slack when job was successful --- .github/workflows/platformDeploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/platformDeploy.yml b/.github/workflows/platformDeploy.yml index 45a47d7503ff..7aa0ee97b510 100644 --- a/.github/workflows/platformDeploy.yml +++ b/.github/workflows/platformDeploy.yml @@ -410,6 +410,7 @@ jobs: WEB: ${{ needs.web.result }} - name: 'Announces the deploy in the #announce Slack room' + if: ${{ success() }} uses: 8398a7/action-slack@v3 with: status: custom From 300decb609729b1a62d0b1ab08d80d44a8fc8048 Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Fri, 5 Nov 2021 13:56:54 -0600 Subject: [PATCH 2/2] Add success logic to other messages --- .github/workflows/platformDeploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/platformDeploy.yml b/.github/workflows/platformDeploy.yml index 7aa0ee97b510..598c8fe2e602 100644 --- a/.github/workflows/platformDeploy.yml +++ b/.github/workflows/platformDeploy.yml @@ -427,6 +427,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - name: 'Announces the deploy in the #deployer Slack room' + if: ${{ success() }} uses: 8398a7/action-slack@v3 with: status: custom @@ -444,7 +445,7 @@ jobs: - name: 'Announces a production deploy in the #expensify-open-source Slack room' uses: 8398a7/action-slack@v3 - if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} + if: ${{ success() && fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} with: status: custom custom_payload: |