-
Notifications
You must be signed in to change notification settings - Fork 31
68 lines (53 loc) · 2.51 KB
/
9-slack-update-message-line-breaks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: test-9-slack-update-message-line-breaks
on: [push]
jobs:
slack-action:
#if: ${{ false }}
runs-on: ubuntu-latest
name: Test 9 [ubuntu-latest]
steps:
- name: Send Slack Message
uses: archive/github-actions-slack@master
id: send-message-1
with:
slack-function: send-message
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
slack-channel: C036UR2SJ91
slack-text: Test 9 - 1/2 - Message to update
- name: Send Slack Message Result
run: echo 'Data - ${{ steps.send-message-1.outputs.slack-result }}'
- name: Send Slack Reaction To Message
uses: archive/github-actions-slack@master
with:
slack-function: update-message
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
slack-channel: ${{ fromJson(steps.send-message-1.outputs.slack-result).response.channel }}
slack-update-message-ts: ${{ fromJson(steps.send-message-1.outputs.slack-result).response.message.ts }}
slack-update-message-text: |
Test 9.1 - 1/2
Message to update
Updated!
- name: Send Slack Reaction To Message Result
run: echo 'Data - ${{ steps.send-message-1.outputs.slack-result }}'
- name: Send Slack Message
uses: archive/github-actions-slack@master
id: send-message-2
with:
slack-function: send-message
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
slack-channel: C036UR2SJ91
slack-text: Test 9 - 2/2 - Message to update
- name: Send Slack Message Result
run: echo 'Data - ${{ steps.send-message-2.outputs.slack-result }}'
- name: Some step in between
run: echo '...'
- name: Send Slack Reaction To Message
uses: archive/github-actions-slack@master
with:
slack-function: update-message
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
slack-channel: ${{ fromJson(steps.send-message-2.outputs.slack-result).response.channel }}
slack-update-message-ts: ${{ fromJson(steps.send-message-2.outputs.slack-result).response.message.ts }}
slack-update-message-text: "${{ format('{0}\n\n{1}', 'Test 9.1 - 2/2', toJson(runner)) }}"
- name: Send Slack Reaction To Message Result
run: echo 'Data - ${{ steps.send-message-2.outputs.slack-result }}'