chore: modify test action
[skip ci]
This commit is contained in:
parent
5a5752d902
commit
66b3858351
3 changed files with 31 additions and 16 deletions
23
.github/actions/notify/action.yaml
vendored
23
.github/actions/notify/action.yaml
vendored
|
|
@ -11,6 +11,15 @@ inputs:
|
|||
required: true
|
||||
default: 'no title provided'
|
||||
|
||||
subtitle:
|
||||
description: "The subtitle of the notification."
|
||||
required: true
|
||||
default: 'no subtitle provided'
|
||||
|
||||
image_url:
|
||||
description: "The URL of the image to be included in the notification."
|
||||
required: false
|
||||
|
||||
event_author:
|
||||
description: "The author of the event."
|
||||
required: true
|
||||
|
|
@ -35,6 +44,11 @@ inputs:
|
|||
required: true
|
||||
default: 'none'
|
||||
|
||||
status:
|
||||
description: "The status of the event."
|
||||
required: true
|
||||
default: 'unknown'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
|
|
@ -69,7 +83,8 @@ runs:
|
|||
|
||||
PAYLOAD=$(jq -n -r \
|
||||
--arg header "${{ inputs.title }}" \
|
||||
--arg repo "${{ github.repository || '' }}" \
|
||||
--arg subtitle "${{ inputs.subtitle || '' }}" \
|
||||
--arg imgurl "${{ inputs.image_url || 'https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/git.png' }}" \
|
||||
--arg title "${{ inputs.event_title || 'no event title given' }}" \
|
||||
--arg body "${{ inputs.event_body || 'no event body given' }}" \
|
||||
--arg author "${{ inputs.event_author || 'no event author given' }}" \
|
||||
|
|
@ -77,8 +92,8 @@ runs:
|
|||
'{ "cardsV2": [ { "cardId": "notify-${{ github.run_id }}", "card": {
|
||||
"header": {
|
||||
"title": "\($header)",
|
||||
"subtitle": "Repo: \($repo)",
|
||||
"imageUrl": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/git.png",
|
||||
"subtitle": "\($subtitle)",
|
||||
"imageUrl": "\($imgurl)",
|
||||
"imageType": "SQUARE"
|
||||
},
|
||||
"sections": [
|
||||
|
|
@ -91,7 +106,7 @@ runs:
|
|||
"icon": {
|
||||
"knownIcon": "PERSON"
|
||||
},
|
||||
"text": "<b>Opened by:</b> \($author)"
|
||||
"text": "<b>\($author)</b>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue