diff --git a/.github/actions/notify/action.yaml b/.github/actions/notify/action.yaml index 153bd0b3..f9957867 100644 --- a/.github/actions/notify/action.yaml +++ b/.github/actions/notify/action.yaml @@ -48,7 +48,7 @@ inputs: status: description: "The status of the event." required: true - default: 'unknown' + default: 'UNKNOWN' runs: using: "composite" @@ -69,14 +69,18 @@ runs: case "${{ inputs.status }}" in SUCCESS) STATUS_COLOR="006400/228b22" + ADD='{"decoratedText": {"startIcon": {"materialIcon": {"name": "check_circle"}},"text": "\($status)"}},' ;; FAILURE) STATUS_COLOR="8b0000/dc143c" + ADD='{"decoratedText": {"startIcon": {"materialIcon": {"name": "stop_circle"}},"text": "\($status)"}},' ;; *) STATUS_COLOR="483d8b/6495ed" + ADD='' ;; echo "color=${STATUS_COLOR}" >> "$GITHUB_OUTPUT" + echo "status_add=${ADD}" >> "$GITHUB_OUTPUT" - name: Notify via Google Chat Webhook shell: bash @@ -105,9 +109,10 @@ runs: "header": "\($title)", "collapsible": false, "widgets": [ + ${{ steps.status.outputs.status_add }} { "decoratedText": { - "icon": { + "startIcon": { "knownIcon": "PERSON" }, "text": "\($author)"