GHA: roll put slack build failed notification

This commit is contained in:
aboyko
2023-11-01 15:59:44 -04:00
parent 4fcf8ff9a5
commit 10cb1ef7ec
5 changed files with 14 additions and 21 deletions

View File

@@ -103,8 +103,7 @@ jobs:
notify-failure:
needs: [ eclipse-language-servers-build ]
if: ${{ always() && contains(needs.*.result, 'failure') }}
uses: ./.github/workflows/notify-failed-build.yml
uses: ./.github/workflows/notify-failed.yml
with:
link: '[${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})'
label: 'Failed LS Extensions ${{ inputs.build_type }} build'
md_message: "*Failed LS Extensions ${{ inputs.build_type }} Build:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>"
secrets: inherit

View File

@@ -324,8 +324,7 @@ jobs:
notify-failure:
needs: [ eclipse-distro-build, sign-win-distros, sign-osx-distros, cleanup ]
if: ${{ always() && contains(needs.*.result, 'failure') }}
uses: ./.github/workflows/notify-failed-build.yml
uses: ./.github/workflows/notify-failed.yml
with:
link: '[${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})'
label: 'Failed Eclipse ${{ inputs.eclipse_profile }} Distribution ${{ inputs.build_type }} build'
md_message: "*Failed Eclipse '${{ inputs.eclipse_profile }}' Distribution ${{ inputs.build_type }} Build:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>"
secrets: inherit

View File

@@ -1,14 +1,10 @@
name: Notify Failed Build
name: Notify Failed
on:
workflow_call:
inputs:
link:
description: Workflow URL link markdown
required: true
type: string
label:
description: Build label
md_message:
description: Markdown message
required: true
type: string
@@ -24,13 +20,13 @@ jobs:
channel-id: "C0188MENU2J"
payload: |
{
"text": "${{ inputs.label }} ${{ inputs.link }}",
"text": "${{ inputs.md_message }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":fail: *${{ inputs.label }}* ${{ inputs.link }}"
"text": ":fail: ${{ inputs.md_message }}"
}
}
]

View File

@@ -6,9 +6,9 @@ concurrency:
on:
workflow_dispatch:
# push:
# branches:
# - 'main'
push:
branches:
- 'main'
jobs:
eclipse-ls-extensions:

View File

@@ -30,8 +30,7 @@ jobs:
notify-failure:
# needs: [ slack-message ]
uses: ./.github/workflows/notify-failed-build.yml
uses: ./.github/workflows/notify-failed.yml
with:
link: '<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>'
label: 'Test Build Failed Message'
md_message: "*Test Build Failed Message* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>"
secrets: inherit