diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 8fb26c665..ff7f3903a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -87,3 +87,16 @@ jobs: with: run: ${{ steps.apply-run.outputs.run_id }} comment: "Apply Run from GitHub Actions CI ${{ github.sha }}" + - name: Report Status + if: failure() + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_USERNAME: "GitHub Actions" + SLACK_COLOR: "#ff0000" + MSG_MINIMAL: "ref,actions url" + SLACK_TITLE: "Deployment Failed" + SLACK_MESSAGE: "Automatic deployment to ${{ env.TF_WORKSPACE }} failed" + with: + status: ${{ job.status }} + notify_when: "failure"