From 9c0f915aa828119bfa0498478fb831a99391c2ce Mon Sep 17 00:00:00 2001 From: Rahul Biju Date: Thu, 30 May 2024 12:20:01 +0530 Subject: [PATCH] Update build.yaml --- .github/workflows/build.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 91d3ce086..559bc12cb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -75,3 +75,16 @@ jobs: name: ${{ matrix.reportName }} path: | liberty-tools-intellij/build/reports/ + + slack-notification: + runs-on: ubuntu-latest + needs: build + if: always() + steps: + - name: 'Slack Notification' + run: | + STATUS=$([[ ${{ needs.build.result }} == "success" ]] && echo "succeeded" || echo "failed") + curl -X POST -H 'Content-type: application/json' --data "{\"text\": \"Workflow ${{ github.workflow }} triggered by branch ${{ github.ref }}. Build results: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}. Status: $STATUS\"}" $SLACK_WEBHOOK_URL + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + shell: bash