diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index 6b679a2d..a17a80c7 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -53,3 +53,31 @@ jobs: with: tag: v${{ steps.version.outputs.version }} generateReleaseNotes: true + + notify-failure: + needs: [build, release] + if: failure() + runs-on: ubuntu-latest + steps: + - name: Notify Slack on release failure + uses: slackapi/slack-github-action@v2.1.0 + with: + errors: true + webhook: ${{ secrets.PLATFORM_INCIDENT_SLACK_CHANNEL_WEBHOOK }} + webhook-type: incoming-webhook + payload: | + text: ":rotating_light: Release failed in ${{ github.repository }}" + blocks: + - type: section + text: + type: mrkdwn + text: | + :rotating_light: *Release failed:* `${{ github.repository }}` + *Commit:* <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}> + - type: actions + elements: + - type: button + text: + type: plain_text + text: "View failed run" + url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"