diff --git a/.github/workflows/slack_notification.yml b/.github/workflows/slack_notification.yml index 56fa9d6d5..945d3f33e 100644 --- a/.github/workflows/slack_notification.yml +++ b/.github/workflows/slack_notification.yml @@ -30,7 +30,7 @@ jobs: echo "::set-output name=suid::$suid" - name: tests uses: ravsamhq/notify-slack-action@v2 - if: ${{ github.event.workflow_run.head_branch != 'main' && github.event.workflow_run.head_branch != 'staging' && github.event.workflow_run.head_branch != 'production' }} + if: ${{ github.event.workflow_run.name != 'Deployment' }} with: status: ${{ github.event.workflow_run.conclusion }} notification_title: "Tests ${{github.event.workflow_run.conclusion}} on *${{github.event.workflow_run.head_branch}}* - <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View ${{github.event.workflow_run.conclusion}}>" @@ -40,7 +40,7 @@ jobs: mention_users_when: "failure,warnings" - name: deployment uses: ravsamhq/notify-slack-action@v2 - if: ${{ github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'staging' || github.event.workflow_run.head_branch == 'production' }} + if: ${{ github.event.workflow_run.name == 'Deployment' && (github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'staging' || github.event.workflow_run.head_branch == 'production') }} with: status: ${{ github.event.workflow_run.conclusion }} notification_title: "Deployment ${{github.event.workflow_run.conclusion}} on *${{github.event.workflow_run.head_branch}}* - <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View ${{github.event.workflow_run.conclusion}}>"