diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 18c225ad30..74f31f4888 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -85,3 +85,21 @@ jobs: ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository ) with: files: ./**/build/test-results/**/*.xml + +# Notify the channel about runs against develop or main that have failures, as PRs should have caught these first. + notify: + runs-on: ubuntu-latest + needs: + - unit-tests + - build-android-test-matrix-sdk + - build-android-test-app + if: ${{ (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' ) && failure() }} + steps: + - uses: michaelkaye/matrix-hookshot-action@v0.3.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + matrix_access_token: ${{ secrets.ELEMENT_ANDROID_NOTIFICATION_ACCESS_TOKEN }} + matrix_room_id: ${{ secrets.ELEMENT_ANDROID_INTERNAL_ROOM_ID }} + text_template: "Build is broken for ${{ github.ref }} 🎊: {{#each job_statuses }}{{#with this }}{{#if completed }} {{name}} {{conclusion}} at {{completed_at}}, {{/if}}{{/with}}{{/each}}" + html_template: "Build is broken for ${{ github.ref }} 🎊: {{#each job_statuses }}{{#with this }}{{#if completed }}
{{icon conclusion }}{{name}} {{conclusion}} at {{completed_at}} [details]{{/if}}{{/with}}{{/each}}" +