Merge branch '3.1.x' into 3.2.x
This commit is contained in:
commit
f863be5f83
|
@ -4,6 +4,9 @@ inputs:
|
||||||
webhook-url:
|
webhook-url:
|
||||||
description: 'Google Chat Webhook URL'
|
description: 'Google Chat Webhook URL'
|
||||||
required: true
|
required: true
|
||||||
|
status:
|
||||||
|
description: 'Status of the job'
|
||||||
|
required: true
|
||||||
build-scan-url:
|
build-scan-url:
|
||||||
description: 'URL of the build scan to include in the notification'
|
description: 'URL of the build scan to include in the notification'
|
||||||
run-name:
|
run-name:
|
||||||
|
@ -17,14 +20,14 @@ runs:
|
||||||
echo "BUILD_SCAN=${{ inputs.build-scan-url == '' && ' [build scan unavailable]' || format(' [<{0}|Build Scan>]', inputs.build-scan-url) }}" >> "$GITHUB_ENV"
|
echo "BUILD_SCAN=${{ inputs.build-scan-url == '' && ' [build scan unavailable]' || format(' [<{0}|Build Scan>]', inputs.build-scan-url) }}" >> "$GITHUB_ENV"
|
||||||
echo "RUN_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> "$GITHUB_ENV"
|
echo "RUN_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> "$GITHUB_ENV"
|
||||||
- shell: bash
|
- shell: bash
|
||||||
if: ${{ success() }}
|
if: ${{ inputs.status == 'success' }}
|
||||||
run: |
|
run: |
|
||||||
curl -X POST ${{ inputs.webhook-url }} -H 'Content-Type: application/json' -d '{ text: "<${{ env.RUN_URL }}|${{ inputs.run-name }}> was successful ${{ env.BUILD_SCAN }}"}' || true
|
curl -X POST ${{ inputs.webhook-url }} -H 'Content-Type: application/json' -d '{ text: "<${{ env.RUN_URL }}|${{ inputs.run-name }}> was successful ${{ env.BUILD_SCAN }}"}' || true
|
||||||
- shell: bash
|
- shell: bash
|
||||||
if: ${{ failure() }}
|
if: ${{ inputs.status == 'failure' }}
|
||||||
run: |
|
run: |
|
||||||
curl -X POST ${{ inputs.webhook-url }} -H 'Content-Type: application/json' -d '{ text: "<users/all> *<${{ env.RUN_URL }}|${{ inputs.run-name }}> failed* ${{ env.BUILD_SCAN }}"}' || true
|
curl -X POST ${{ inputs.webhook-url }} -H 'Content-Type: application/json' -d '{ text: "<users/all> *<${{ env.RUN_URL }}|${{ inputs.run-name }}> failed* ${{ env.BUILD_SCAN }}"}' || true
|
||||||
- shell: bash
|
- shell: bash
|
||||||
if: ${{ cancelled() }}
|
if: ${{ inputs.status == 'cancelled' }}
|
||||||
run: |
|
run: |
|
||||||
curl -X POST ${{ inputs.webhook-url }} -H 'Content-Type: application/json' -d '{ text: "<${{ env.RUN_URL }}|${{ inputs.run-name }}> was cancalled"}' || true
|
curl -X POST ${{ inputs.webhook-url }} -H 'Content-Type: application/json' -d '{ text: "<${{ env.RUN_URL }}|${{ inputs.run-name }}> was cancelled"}' || true
|
||||||
|
|
|
@ -52,5 +52,6 @@ jobs:
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
|
webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
|
||||||
|
status: ${{ job.status }}
|
||||||
build-scan-url: ${{ steps.build.outputs.build-scan-url }}
|
build-scan-url: ${{ steps.build.outputs.build-scan-url }}
|
||||||
run-name: ${{ format('{0} | Windows | Java 17', github.ref_name) }}
|
run-name: ${{ format('{0} | Windows | Java 17', github.ref_name) }}
|
||||||
|
|
Loading…
Reference in New Issue