Skip to content

Commit

Permalink
Update build.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul-Biju committed May 29, 2024
1 parent d8205b8 commit 0b5eac1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,14 @@ jobs:
name: ${{ matrix.reportName }}
path: |
liberty-tools-intellij/build/reports/
slack-notification:
runs-on: ubuntu-latest
needs: build
steps:
- name: 'Slack Notification'
if: always() # Ensure the notification is sent regardless of job statuses
run: |
STATUS=$([[ ${{ job.status }} == "success" ]] && echo "succeeded" || echo "failed")
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 }}. PR: ${{ github.event.pull_request.html_url || 'N/A' }}. 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 }}
Expand Down

0 comments on commit 0b5eac1

Please sign in to comment.