@@ -23,10 +23,52 @@ jobs:
23
23
footer : " Linked Repo <${{github.server_url}}/${{github.repository}}|${{github.repository}}> | <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View Failure>"
24
24
env :
25
25
SLACK_WEBHOOK_URL : ${{ secrets.SLACK_ALERT_WEBHOOK }}
26
-
27
- on-success :
26
+ on-success-test :
28
27
runs-on : ubuntu-latest
29
28
if : github.event.workflow_run.conclusion == 'success'
30
29
steps :
31
- - run : ${{ tojson(github.event) }}
32
- shell : cat {0}
30
+ # Deploy to existing slack alerts channel on success
31
+ - uses : ravsamhq/notify-slack-action@v2
32
+ with :
33
+ status : ${{ github.event.workflow_run.conclusion }}
34
+ notification_title : " ${{github.event.workflow_run.name}} - ${{github.event.workflow_run.conclusion}} on ${{github.event.workflow_run.head_branch}} - <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View Failure>"
35
+ message_format : " :rocket: *${{github.event.workflow_run.name}}* ${{github.event.workflow_run.conclusion}} in <${{github.server_url}}/${{github.repository}}/${{github.event.workflow_run.head_branch}}|${{github.repository}}>"
36
+ footer : " Linked Repo <${{github.server_url}}/${{github.repository}}|${{github.repository}}> | <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View Failure>"
37
+ env :
38
+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_ALERT_WEBHOOK }}
39
+ # Deploy to new preprod slack deployments channel on success
40
+ - uses : ravsamhq/notify-slack-action@v2
41
+ with :
42
+ status : ${{ github.event.workflow_run.conclusion }}
43
+ notification_title : " ${{github.event.workflow_run.name}} - ${{github.event.workflow_run.conclusion}} on ${{github.event.workflow_run.head_branch}} - <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View Failure>"
44
+ message_format : " :rocket: *${{github.event.workflow_run.name}}* ${{github.event.workflow_run.conclusion}} in <${{github.server_url}}/${{github.repository}}/${{github.event.workflow_run.head_branch}}|${{github.repository}}>"
45
+ footer : " Linked Repo <${{github.server_url}}/${{github.repository}}|${{github.repository}}> | <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View Failure>"
46
+ env :
47
+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_PREPROD_DEPLOYMENTS }}
48
+ # Deploy to new prod slack deployments channel on success
49
+ - uses : ravsamhq/notify-slack-action@v2
50
+ with :
51
+ status : ${{ github.event.workflow_run.conclusion }}
52
+ notification_title : " ${{github.event.workflow_run.name}} - ${{github.event.workflow_run.conclusion}} on ${{github.event.workflow_run.head_branch}} - <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View Failure>"
53
+ message_format : " :rocket: *${{github.event.workflow_run.name}}* ${{github.event.workflow_run.conclusion}} in <${{github.server_url}}/${{github.repository}}/${{github.event.workflow_run.head_branch}}|${{github.repository}}>"
54
+ footer : " Linked Repo <${{github.server_url}}/${{github.repository}}|${{github.repository}}> | <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View Failure>"
55
+ env :
56
+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_PROD_DEPLOYMENTS }}
57
+ # Deploy to new preprod teams deployments channel on success
58
+ - uses : jdcargile/ms-teams-notification@v1.4
59
+ with :
60
+ github-token : ${{ github.token }} # this will use the runner's token.
61
+ ms-teams-webhook-uri : ${{ secrets.TEAMS_WEBHOOK_PREPROD_DEPLOYMENTS }}
62
+ notification-summary : " Deploying to Preprod"
63
+ notification-color : 17a2b8
64
+ timezone : Europe/London
65
+ verbose-logging : true
66
+ # Deploy to new prod teams deployments channel on success
67
+ - uses : jdcargile/ms-teams-notification@v1.4
68
+ with :
69
+ github-token : ${{ github.token }} # this will use the runner's token.
70
+ ms-teams-webhook-uri : ${{ secrets.TEAMS_WEBHOOK_PROD_DEPLOYMENTS }}
71
+ notification-summary : " Deploying to Prod"
72
+ notification-color : 17a2b8
73
+ timezone : Europe/London
74
+ verbose-logging : true
0 commit comments