Skip to content

Commit

Permalink
Merge pull request #5163 from nipunayf/daily-notification
Browse files Browse the repository at this point in the history
Send daily release notification for editor
  • Loading branch information
keizer619 authored Jan 8, 2024
2 parents a504fdf + 544246c commit a8e1b2b
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/daily-build-editor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
echo "Created linux-rpm successfully"
- name: Archive Ballerina ZIP
uses: actions/upload-artifact@v2
id: artifact-upload
with:
name: Ballerina ZIP
path: ballerina-distribution/ballerina/build/distributions/ballerina-*-swan-lake.zip
Expand Down Expand Up @@ -137,3 +138,51 @@ jobs:
with:
name: Windows Installer ZIP
path: ballerina-distribution/ballerina/build/distributions/ballerina-*-windows.zip
- name: Send release notification
shell: bash
run: |
body=$(cat << EOF
{
"cards": [
{
"header": {
"title": "Daily Build",
},
"sections": [
{
"widgets": [
{
"keyValue": {
"topLabel": "Ballerina Distribution",
"content": "v2201.9.0",
"onClick": {
"openLink": {
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
},
"iconUrl": "https://lh6.googleusercontent.com/proxy/R9Rx8vYNd-_HZn58ckf5PNX7RMlC6P-B75fB7UQ_GFH5R0UwtfJ1gVNARBvH1us8LBuK4NVFsvMGnwZkm-H2_9ACwH_j0lQmExR1SRMNGlFcbrm_1O7foFpqqOiVzA",
"button": {
"textButton": {
"text": "Download ZIP",
"onClick": {
"openLink": {
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.artifact-upload.outputs.artifact-id }}"
}
}
}
}
}
}
]
}
]
}
]
}
EOF
)
curl \
-X POST \
-H 'Content-Type: application/json' \
"https://chat.googleapis.com/v1/spaces/AAAApvQDm3o/messages?key=${{ secrets.EDITOR_CHAT_BOT_KEY }}&token=${{ secrets.EDITOR_CHAT_BOT_TOKEN }}" \
-d "$body"

0 comments on commit a8e1b2b

Please sign in to comment.