chore: modify test action
[skip ci]
This commit is contained in:
parent
3ff3a0355c
commit
af8481a003
1 changed files with 7 additions and 2 deletions
9
.github/actions/notify/action.yaml
vendored
9
.github/actions/notify/action.yaml
vendored
|
|
@ -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": "<b style=\"color: green;\">\($status)</b>"}},'
|
||||
;;
|
||||
FAILURE)
|
||||
STATUS_COLOR="8b0000/dc143c"
|
||||
ADD='{"decoratedText": {"startIcon": {"materialIcon": {"name": "stop_circle"}},"text": "<b style=\"color: red;\">\($status)</b>"}},'
|
||||
;;
|
||||
*)
|
||||
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": "<b>\($author)</b>"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue