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:
|
status:
|
||||||
description: "The status of the event."
|
description: "The status of the event."
|
||||||
required: true
|
required: true
|
||||||
default: 'unknown'
|
default: 'UNKNOWN'
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
|
|
@ -69,14 +69,18 @@ runs:
|
||||||
case "${{ inputs.status }}" in
|
case "${{ inputs.status }}" in
|
||||||
SUCCESS)
|
SUCCESS)
|
||||||
STATUS_COLOR="006400/228b22"
|
STATUS_COLOR="006400/228b22"
|
||||||
|
ADD='{"decoratedText": {"startIcon": {"materialIcon": {"name": "check_circle"}},"text": "<b style=\"color: green;\">\($status)</b>"}},'
|
||||||
;;
|
;;
|
||||||
FAILURE)
|
FAILURE)
|
||||||
STATUS_COLOR="8b0000/dc143c"
|
STATUS_COLOR="8b0000/dc143c"
|
||||||
|
ADD='{"decoratedText": {"startIcon": {"materialIcon": {"name": "stop_circle"}},"text": "<b style=\"color: red;\">\($status)</b>"}},'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
STATUS_COLOR="483d8b/6495ed"
|
STATUS_COLOR="483d8b/6495ed"
|
||||||
|
ADD=''
|
||||||
;;
|
;;
|
||||||
echo "color=${STATUS_COLOR}" >> "$GITHUB_OUTPUT"
|
echo "color=${STATUS_COLOR}" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "status_add=${ADD}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Notify via Google Chat Webhook
|
- name: Notify via Google Chat Webhook
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
@ -105,9 +109,10 @@ runs:
|
||||||
"header": "\($title)",
|
"header": "\($title)",
|
||||||
"collapsible": false,
|
"collapsible": false,
|
||||||
"widgets": [
|
"widgets": [
|
||||||
|
${{ steps.status.outputs.status_add }}
|
||||||
{
|
{
|
||||||
"decoratedText": {
|
"decoratedText": {
|
||||||
"icon": {
|
"startIcon": {
|
||||||
"knownIcon": "PERSON"
|
"knownIcon": "PERSON"
|
||||||
},
|
},
|
||||||
"text": "<b>\($author)</b>"
|
"text": "<b>\($author)</b>"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue