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:
66 required: true
77 build-scan-url:
88 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) }}
912runs:
1013 using: composite
1114 steps:
1215 - shell: bash
1316 run: |
1417 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"
1519 - shell: bash
1620 if: ${{ success() }}
1721 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
1923 - shell: bash
2024 if: ${{ failure() }}
2125 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
2327 - shell: bash
2428 if: ${{ cancelled() }}
2529 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:
77 group: ${{ github.workflow }}-${{ github.ref }}
88jobs:
99 build:
10- name: 'Java 17 | Windows '
10+ name: 'Windows | Java 17 '
1111 runs-on: 'windows-latest'
1212 if: ${{ github.repository == 'spring-projects/spring-boot' }}
1313 steps:
5353 with:
5454 webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
5555 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