Skip to content

Commit cdd3d01

Browse files
committed
code changes needed to upgrade to slack github action v2
1 parent 534fab1 commit cdd3d01

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

.github/workflows/deploy.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,22 @@ jobs:
8181

8282
- name: Notify Slack Success
8383
uses: slackapi/[email protected]
84-
env:
85-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
8684
with:
87-
channel-id: 'coding-exercise-queue'
88-
slack-message: ':white_check_mark: Deployment to *dev* succeeded'
85+
method: chat.postMessage
86+
token: ${{ secrets.SLACK_BOT_TOKEN }}
87+
payload: |
88+
channel: coding-exercise-queue
89+
text: ":white_check_mark: Deployment to *dev* succeeded"
8990
9091
- name: Notify Slack Failure
9192
uses: slackapi/[email protected]
9293
if: ${{ failure() }}
93-
env:
94-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
9594
with:
96-
channel-id: 'coding-exercise-queue'
97-
slack-message: ':x: Deployment to *dev* failed'
95+
method: chat.postMessage
96+
token: ${{ secrets.SLACK_BOT_TOKEN }}
97+
payload: |
98+
channel: coding-exercise-queue
99+
text: ":x: Deployment to *dev* failed"
98100
99101
deploy-prod:
100102
name: Deploy Prod
@@ -142,17 +144,19 @@ jobs:
142144

143145
- name: Notify Slack Success
144146
uses: slackapi/[email protected]
145-
env:
146-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
147147
with:
148-
channel-id: 'coding-exercise-queue'
149-
slack-message: ':white_check_mark: Deployment to *prod* succeeded'
148+
method: chat.postMessage
149+
token: ${{ secrets.SLACK_BOT_TOKEN }}
150+
payload: |
151+
channel: coding-exercise-queue
152+
text: ":white_check_mark: Deployment to *prod* succeeded"
150153
151154
- name: Notify Slack Failure
152155
uses: slackapi/[email protected]
153156
if: ${{ failure() }}
154-
env:
155-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
156157
with:
157-
channel-id: 'coding-exercise-queue'
158-
slack-message: ':x: Deployment to *prod* failed'
158+
method: chat.postMessage
159+
token: ${{ secrets.SLACK_BOT_TOKEN }}
160+
payload: |
161+
channel: coding-exercise-queue
162+
text: ":x: Deployment to *prod* failed"

0 commit comments

Comments
 (0)