Skip to content

Commit 2bda2cd

Browse files
committed
fix slack payload for v2.0.0
1 parent b12c481 commit 2bda2cd

File tree

2 files changed

+34
-69
lines changed

2 files changed

+34
-69
lines changed

.github/workflows/nightly-smoke-tests.yml

Lines changed: 26 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -47,60 +47,31 @@ jobs:
4747
if: always() && github.repository == 'linode/linode_api4-python'
4848
uses: slackapi/slack-github-action@v2.0.0
4949
with:
50-
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
50+
method: chat.postMessage
51+
token: ${{ secrets.SLACK_BOT_TOKEN }}
5152
payload: |
52-
{
53-
"blocks": [
54-
{
55-
"type": "section",
56-
"text": {
57-
"type": "mrkdwn",
58-
"text": ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
59-
}
60-
},
61-
{
62-
"type": "divider"
63-
},
64-
{
65-
"type": "section",
66-
"fields": [
67-
{
68-
"type": "mrkdwn",
69-
"text": "*Build Result:*\n${{ steps.smoke_tests.outcome == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
70-
},
71-
{
72-
"type": "mrkdwn",
73-
"text": "*Branch:*\n`${{ github.ref_name }}`"
74-
}
75-
]
76-
},
77-
{
78-
"type": "section",
79-
"fields": [
80-
{
81-
"type": "mrkdwn",
82-
"text": "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
83-
},
84-
{
85-
"type": "mrkdwn",
86-
"text": "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
87-
}
88-
]
89-
},
90-
{
91-
"type": "divider"
92-
},
93-
{
94-
"type": "context",
95-
"elements": [
96-
{
97-
"type": "mrkdwn",
98-
"text": "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"
99-
}
100-
]
101-
}
102-
]
103-
}
104-
env:
105-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
53+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
54+
blocks:
55+
- type: section
56+
text:
57+
type: mrkdwn
58+
text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
59+
- type: divider
60+
- type: section
61+
fields:
62+
- type: mrkdwn
63+
text: "*Build Result:*\n${{ steps.smoke_tests.outcome == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
64+
- type: mrkdwn
65+
text: "*Branch:*\n`${{ github.ref_name }}`"
66+
- type: section
67+
fields:
68+
- type: mrkdwn
69+
text: "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
70+
- type: mrkdwn
71+
text: "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
72+
- type: divider
73+
- type: context
74+
elements:
75+
- type: mrkdwn
76+
text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"
10677

.github/workflows/release-notify-slack.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,12 @@ jobs:
1313
id: main_message
1414
uses: slackapi/slack-github-action@v2.0.0
1515
with:
16-
channel-id: ${{ secrets.DEV_DX_SLACK_CHANNEL_ID }}
16+
method: chat.postMessage
17+
token: ${{ secrets.SLACK_BOT_TOKEN }}
1718
payload: |
18-
{
19-
"blocks": [
20-
{
21-
"type": "section",
22-
"text": {
23-
"type": "mrkdwn",
24-
"text": "*New Release Published: _linode_api4-python_ <${{ github.event.release.html_url }}|${{ github.event.release.tag_name }}> is now live!* :tada:"
25-
}
26-
}
27-
]
28-
}
29-
env:
30-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
19+
channel: ${{ secrets.DEV_DX_SLACK_CHANNEL_ID }}
20+
blocks:
21+
- type: section
22+
text:
23+
type: mrkdwn
24+
text: "*New Release Published: _linode_api4-python_ <${{ github.event.release.html_url }}|${{ github.event.release.tag_name }}> is now live!* :tada:"

0 commit comments

Comments
 (0)