From 10cb1ef7ec6b5357112ceba61a74738292a5eb4a Mon Sep 17 00:00:00 2001 From: aboyko Date: Wed, 1 Nov 2023 15:59:44 -0400 Subject: [PATCH] GHA: roll put slack build failed notification --- .github/workflows/eclipse-ls-extensions-build.yml | 5 ++--- .../workflows/gh-hosted-eclipse-distro-build.yml | 5 ++--- .../{notify-failed-build.yml => notify-failed.yml} | 14 +++++--------- .../snapshot-eclipse-ls-extensions-build.yml | 6 +++--- .github/workflows/test-slack-message.yml | 5 ++--- 5 files changed, 14 insertions(+), 21 deletions(-) rename .github/workflows/{notify-failed-build.yml => notify-failed.yml} (66%) diff --git a/.github/workflows/eclipse-ls-extensions-build.yml b/.github/workflows/eclipse-ls-extensions-build.yml index 855db331c..145639736 100644 --- a/.github/workflows/eclipse-ls-extensions-build.yml +++ b/.github/workflows/eclipse-ls-extensions-build.yml @@ -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 diff --git a/.github/workflows/gh-hosted-eclipse-distro-build.yml b/.github/workflows/gh-hosted-eclipse-distro-build.yml index 396231546..a13955c37 100644 --- a/.github/workflows/gh-hosted-eclipse-distro-build.yml +++ b/.github/workflows/gh-hosted-eclipse-distro-build.yml @@ -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 diff --git a/.github/workflows/notify-failed-build.yml b/.github/workflows/notify-failed.yml similarity index 66% rename from .github/workflows/notify-failed-build.yml rename to .github/workflows/notify-failed.yml index 599abb12a..91b297afd 100644 --- a/.github/workflows/notify-failed-build.yml +++ b/.github/workflows/notify-failed.yml @@ -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 }}" } } ] diff --git a/.github/workflows/snapshot-eclipse-ls-extensions-build.yml b/.github/workflows/snapshot-eclipse-ls-extensions-build.yml index 79e42f0d2..b3c765b09 100644 --- a/.github/workflows/snapshot-eclipse-ls-extensions-build.yml +++ b/.github/workflows/snapshot-eclipse-ls-extensions-build.yml @@ -6,9 +6,9 @@ concurrency: on: workflow_dispatch: -# push: -# branches: -# - 'main' + push: + branches: + - 'main' jobs: eclipse-ls-extensions: diff --git a/.github/workflows/test-slack-message.yml b/.github/workflows/test-slack-message.yml index 8485f3bf3..0405b1e8e 100644 --- a/.github/workflows/test-slack-message.yml +++ b/.github/workflows/test-slack-message.yml @@ -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