File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Test Slack Notification
2+
3+ # scheduler_daily.yml の Slack 通知ステップは `if: failure()` 条件のため、
4+ # 日次ビルドが失敗しない限り発火せず、動作確認ができない。
5+ # このワークフローは通知ステップだけを手動実行できるようにしたもの。
6+ # slackapi/slack-github-action をアップグレードした際の疎通確認に使う。
7+ #
8+ # 実行方法:
9+ # gh workflow run test_slack_notification.yml
10+ #
11+ # 注意: scheduler_daily.yml の Slack ステップと同じ設定を保つこと。
12+ # 片方だけ変更すると、このテストの意味がなくなる。
13+ on :
14+ workflow_dispatch :
15+
16+ jobs :
17+ notify :
18+ runs-on : ubuntu-latest
19+
20+ steps :
21+ - name : 🔔 Send a test message to Slack
22+ uses : slackapi/slack-github-action@v3.0.5
23+ with :
24+ webhook : ${{ secrets.SLACK_WEBHOOK_URL }}
25+ webhook-type : incoming-webhook
26+
27+ # scheduler_daily.yml と同じ形式のペイロード(文面のみテスト用)
28+ payload : |
29+ {
30+ "text": "[TEST] DojoMap の Slack 通知テストです。(詳細を見る)",
31+ "blocks": [
32+ {
33+ "type": "section",
34+ "text": {
35+ "type": "mrkdwn",
36+ "text": "[TEST] DojoMap の Slack 通知テストです。エラー通知ではありません。(<https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|詳細を見る>)"
37+ }
38+ }
39+ ]
40+ }
You can’t perform that action at this time.
0 commit comments