Fix GChat card. Switch to V2 card
This commit is contained in:
@@ -342,12 +342,6 @@ jobs:
|
||||
name: Send GChat message
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup AWS CLI 2.22
|
||||
run: |
|
||||
curl -s "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.22.35.zip" -o "awscliv2.zip"
|
||||
unzip -q awscliv2.zip
|
||||
sudo ./aws/install --update
|
||||
aws --version
|
||||
- name: Google Chat Notification
|
||||
run: |
|
||||
echo "P2 Update Site: ${DOWNLOAD_URL_ROOT}/${{ needs.eclipse-distro-build.outputs.p2_path }}"
|
||||
@@ -364,7 +358,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`
|
||||
@@ -378,33 +372,35 @@ jobs:
|
||||
curl --location --request POST '${{ secrets.TOOLS_TEAM_GCHAT_WEBHOOK_URL }}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw "{
|
||||
\"cards\": [
|
||||
\"cardsV2\": [
|
||||
{
|
||||
\"header\": {
|
||||
\"title\": \"STS ${{ needs.eclipse-distro-build.outputs.version }} ${build_type}\",
|
||||
\"subtitle\": \"Eclipse ${eclipse_version}\",
|
||||
\"imageUrl\": \"https://avatars.githubusercontent.com/u/317776?s=48&v=4\",
|
||||
},
|
||||
\"sections\": [
|
||||
{
|
||||
\"widgets\": [
|
||||
{
|
||||
\"keyValue\": {
|
||||
\"topLabel\": \"P2 Update Site\",
|
||||
\"content\": \"<a href=${DOWNLOAD_URL_ROOT}/${{ needs.eclipse-distro-build.outputs.p2_path }}>${DOWNLOAD_URL_ROOT}/${{ needs.eclipse-distro-build.outputs.p2_path }}</a>\",
|
||||
\"contentMultiline\": true
|
||||
\"card\": {
|
||||
\"header\": {
|
||||
\"title\": \"STS ${{ needs.eclipse-distro-build.outputs.version }} ${build_type}\",
|
||||
\"subtitle\": \"Eclipse ${eclipse_version}\",
|
||||
\"imageUrl\": \"https://avatars.githubusercontent.com/u/317776?s=48&v=4\",
|
||||
},
|
||||
\"sections\": [
|
||||
{
|
||||
\"widgets\": [
|
||||
{
|
||||
\"decoratedText\": {
|
||||
\"topLabel\": \"P2 Update Site\",
|
||||
\"text\": \"<a href=${DOWNLOAD_URL_ROOT}/${{ needs.eclipse-distro-build.outputs.p2_path }}>${DOWNLOAD_URL_ROOT}/${{ needs.eclipse-distro-build.outputs.p2_path }}</a>\",
|
||||
\"wrapText\": true
|
||||
}
|
||||
},
|
||||
{
|
||||
\"decoratedText\": {
|
||||
\"topLabel\": \"Distributions\",
|
||||
\"text\": \"${distro_links}\",
|
||||
\"wrapText\": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
\"keyValue\": {
|
||||
\"topLabel\": \"Distributions\",
|
||||
\"content\": \"${distro_links}\",
|
||||
\"contentMultiline\": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}"
|
||||
|
||||
@@ -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&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
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}"
|
||||
|
||||
Reference in New Issue
Block a user