diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 439d2b5..b907a28 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -194,4 +194,17 @@ jobs: env: GH_TOKEN: ${{ secrets.GALASA_TEAM_GITHUB_TOKEN }} run: | - gh workflow run build.yaml --repo https://github.com/galasa-dev/gradle --ref ${{ env.BRANCH }} -f jacocoEnabled=${{ inputs.jacocoEnabled }} -f isMainOrRelease=${{ inputs.isMainOrRelease }} \ No newline at end of file + gh workflow run build.yaml --repo https://github.com/galasa-dev/gradle --ref ${{ env.BRANCH }} -f jacocoEnabled=${{ inputs.jacocoEnabled }} -f isMainOrRelease=${{ inputs.isMainOrRelease }} + + report-failure: + name: Report failure in workflow + runs-on: ubuntu-latest + needs: [log-github-ref, build-wrapping, trigger-gradle-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 "wrapping" --workflowName "${{ github.workflow }}" --workflowRunNum "${{ github.run_id }}" --ref "${{ env.BRANCH }}" --hook "${{ env.SLACK_WEBHOOK }}"