Fix GChat card. Switch to V2 card

This commit is contained in:
aboyko
2025-03-10 09:42:38 -04:00
parent 54ae266071
commit f4e1d03c66
2 changed files with 64 additions and 33 deletions

View File

@@ -58,7 +58,7 @@ jobs:
filename=${file:${#s3_url}+1}
echo $download_url
echo $filename
echo "<li><a href=${download_url}>${filename}</a></li>" >> $downloads_html
echo "<a href=${download_url}>${filename}</a>" >> $downloads_html
fi
done
distro_links=`cat ./$downloads_html`
@@ -100,4 +100,39 @@ jobs:
]
}
]
}"
curl --location --request POST '${{ secrets.TOOLS_TEAM_GCHAT_WEBHOOK_URL }}' \
--header 'Content-Type: application/json' \
--data-raw "{
\"cardsV2\": [
{
\"card\": {
\"header\": {
\"title\": \"STS ${{ inputs.version }} ${build_type}\",
\"subtitle\": \"Eclipse ${eclipse_version}\",
\"imageUrl\": \"https://avatars.githubusercontent.com/u/317776?s=48&amp;v=4\",
},
\"sections\": [
{
\"widgets\": [
{
\"decoratedText\": {
\"topLabel\": \"P2 Update Site\",
\"text\": \"<a href=${DOWNLOAD_URL_ROOT}/${{ inputs.p2_path }}>${DOWNLOAD_URL_ROOT}/${{ inputs.p2_path }}</a>\"
}
},
{
\"decoratedText\": {
\"topLabel\": \"Distributions\",
\"text\": \"${distro_links}\",
\"wrapText\": true
}
}
]
}
]
}
}
]
}"