-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.16 KB
/
slack-test.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
name: Slack Notification Test
on:
workflow_dispatch: # 手動実行可能
jobs:
test-slack:
runs-on: ubuntu-latest
steps:
- name: Send test message
uses: slackapi/[email protected]
with:
payload: |
{
"text": "🎉 Slack通知のテスト",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Slack通知のテスト*\nGitHub ActionsからSlackへの通知テストです。"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*送信元:*\nGitHub Actions"
},
{
"type": "mrkdwn",
"text": "*ステータス:*\n✅ 成功"
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK