Skip to content

Commit b12c481

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

File tree

1 file changed

+26
-56
lines changed

1 file changed

+26
-56
lines changed

.github/workflows/e2e-test.yml

Lines changed: 26 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -160,64 +160,34 @@ jobs:
160160
runs-on: ubuntu-latest
161161
needs: [integration-tests]
162162
if: ${{ (success() || failure()) && github.repository == 'linode/linode_api4-python' }} # Run even if integration tests fail and only on main repository
163-
164163
steps:
165164
- name: Notify Slack
166165
uses: slackapi/slack-github-action@v2.0.0
167166
with:
168-
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
167+
method: chat.postMessage
168+
token: ${{ secrets.SLACK_BOT_TOKEN }}
169169
payload: |
170-
{
171-
"blocks": [
172-
{
173-
"type": "section",
174-
"text": {
175-
"type": "mrkdwn",
176-
"text": ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
177-
}
178-
},
179-
{
180-
"type": "divider"
181-
},
182-
{
183-
"type": "section",
184-
"fields": [
185-
{
186-
"type": "mrkdwn",
187-
"text": "*Build Result:*\n${{ needs.integration-tests.result == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
188-
},
189-
{
190-
"type": "mrkdwn",
191-
"text": "*Branch:*\n`${{ github.ref_name }}`"
192-
}
193-
]
194-
},
195-
{
196-
"type": "section",
197-
"fields": [
198-
{
199-
"type": "mrkdwn",
200-
"text": "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
201-
},
202-
{
203-
"type": "mrkdwn",
204-
"text": "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
205-
}
206-
]
207-
},
208-
{
209-
"type": "divider"
210-
},
211-
{
212-
"type": "context",
213-
"elements": [
214-
{
215-
"type": "mrkdwn",
216-
"text": "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"
217-
}
218-
]
219-
}
220-
]
221-
}
222-
env:
223-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
170+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
171+
blocks:
172+
- type: section
173+
text:
174+
type: mrkdwn
175+
text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
176+
- type: divider
177+
- type: section
178+
fields:
179+
- type: mrkdwn
180+
text: "*Build Result:*\n${{ needs.integration-tests.result == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
181+
- type: mrkdwn
182+
text: "*Branch:*\n`${{ github.ref_name }}`"
183+
- type: section
184+
fields:
185+
- type: mrkdwn
186+
text: "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
187+
- type: mrkdwn
188+
text: "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
189+
- type: divider
190+
- type: context
191+
elements:
192+
- type: mrkdwn
193+
text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"

0 commit comments

Comments
 (0)