diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3fca3fa..cb2a9f9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,3 +23,17 @@ jobs: env: GH_TOKEN: ${{ secrets.GALASA_TEAM_GITHUB_TOKEN }} + report-failure: + name: Report failure in workflow + runs-on: ubuntu-latest + needs: trigger-workflow + if: failure() + + steps: + - name: Report failure in workflow to Slack + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + run : | + docker run --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/galasabld-ibm:main slackpost workflows --repo "helm" --workflowName "${{ github.workflow }}" --workflowRunNum "${{ github.run_id }}" --ref "${{ env.BRANCH }}" --hook "${{ env.SLACK_WEBHOOK }}" + +