From 868629d9c783d31e91587035b237938502b37949 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 28 Feb 2024 10:01:29 +0000 Subject: [PATCH] Allow the build to continue if sending a notification fails See gh-39761 --- .github/actions/send-notification/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/send-notification/action.yml b/.github/actions/send-notification/action.yml index dc696ed248..4bcd642a4b 100644 --- a/.github/actions/send-notification/action.yml +++ b/.github/actions/send-notification/action.yml @@ -15,12 +15,12 @@ runs: - shell: bash if: ${{ success() }} run: | - curl -X POST ${{ inputs.webhook-url }} -H 'Content-Type: application/json' -d '{ text: "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|spring-boot-${{ github.ref_name }} ${{ github.job }} was successful> ${{ env.BUILD_SCAN }}"}' + curl -X POST ${{ inputs.webhook-url }} -H 'Content-Type: application/json' -d '{ text: "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|spring-boot-${{ github.ref_name }} ${{ github.job }} was successful> ${{ env.BUILD_SCAN }}"}' || true - shell: bash if: ${{ failure() }} run: | - curl -X POST ${{ inputs.webhook-url }} -H 'Content-Type: application/json' -d '{ text: " *<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|spring-boot-${{ github.ref_name }} ${{ github.job }} failed>* ${{ env.BUILD_SCAN }}"}' + curl -X POST ${{ inputs.webhook-url }} -H 'Content-Type: application/json' -d '{ text: " *<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|spring-boot-${{ github.ref_name }} ${{ github.job }} failed>* ${{ env.BUILD_SCAN }}"}' || true - shell: bash if: ${{ cancelled() }} run: | - curl -X POST ${{ inputs.webhook-url }} -H 'Content-Type: application/json' -d '{ text: "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|spring-boot-${{ github.ref_name }} ${{ github.job }} was cancalled>"}' + curl -X POST ${{ inputs.webhook-url }} -H 'Content-Type: application/json' -d '{ text: "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|spring-boot-${{ github.ref_name }} ${{ github.job }} was cancalled>"}' || true