File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
actions/send-notification Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -6,21 +6,25 @@ inputs:
6
6
required : true
7
7
build-scan-url :
8
8
description : ' URL of the build scan to include in the notification'
9
+ run-name :
10
+ description : ' Name of the run to include in the notification'
11
+ default : ${{ format('{0} {1}', github.ref_name, github.job) }}
9
12
runs :
10
13
using : composite
11
14
steps :
12
15
- shell : bash
13
16
run : |
14
17
echo "BUILD_SCAN=${{ inputs.build-scan-url == '' && ' [build scan unavailable]' || format(' [<{0}|Build Scan>]', inputs.build-scan-url) }}" >> "$GITHUB_ENV"
18
+ echo "RUN_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> "$GITHUB_ENV"
15
19
- shell : bash
16
20
if : ${{ success() }}
17
21
run : |
18
- 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
22
+ 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
19
23
- shell : bash
20
24
if : ${{ failure() }}
21
25
run : |
22
- curl -X POST ${{ inputs.webhook-url }} -H 'Content-Type: application/json' -d '{ text: "<users/all> *<${{ github.server_url }}/ ${{ github.repository }}/actions/runs/${{ github.run_id }}|spring-boot-${{ github.ref_name }} ${{ github.job }} failed> * ${{ env.BUILD_SCAN }}"}' || true
26
+ 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
23
27
- shell : bash
24
28
if : ${{ cancelled() }}
25
29
run : |
26
- 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
30
+ curl -X POST ${{ inputs.webhook-url }} -H 'Content-Type: application/json' -d '{ text: "<${{ env.RUN_URL }}| ${{ inputs.run-name }}> was cancalled"}' || true
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ concurrency:
7
7
group : ${{ github.workflow }}-${{ github.ref }}
8
8
jobs :
9
9
build :
10
- name : ' Java 17 | Windows '
10
+ name : ' Windows | Java 17 '
11
11
runs-on : ' windows-latest'
12
12
if : ${{ github.repository == 'spring-projects/spring-boot' }}
13
13
steps :
53
53
with :
54
54
webhook-url : ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
55
55
build-scan-url : ${{ steps.build.outputs.build-scan-url }}
56
+ run-name : ${{ format('{0} | Windows | Java 17', github.ref_name) }}
You can’t perform that action at this time.
0 commit comments