@@ -23,19 +23,45 @@ jobs:
2323 # Only notify slack on release events
2424 if : ${{ needs.context.outputs.is_release_master || needs.context.outputs.is_release_tag }}
2525 steps :
26- - uses : actions/checkout@v4
2726 - name : Notify Slack
28- uses : ./ .github/actions/slack
27+ uses : mozilla/addons/ .github/actions/slack@main
2928 env :
30- retry_text : ' [Rerun Workflow](${{ github.event.workflow_run.rerun_url }})'
31- event_text : ${{ needs.context.outputs.is_release_master && 'Release Master' || 'Release Tag' }}
29+ workflow_run_url : ${{ github.event.workflow_run.url }}
30+ retry : ' [Rerun Workflow](${{ github.event.workflow_run.rerun_url }})'
31+ release_master : ${{ needs.context.outputs.is_release_master }}
32+ event : ${{ env.release_master && 'Release Master' || 'Release Tag' }}
33+ conclusion : ${{ github.event.workflow_run.conclusion }}
34+ conclusion_emoji : ${{ env.conclusion == 'success' && ':white_check_mark:' || ':x:' }}
35+ text : ${{ env.conclusion_emoji }} ${{ env.event }} completed with ${{ github.event.workflow_run.conclusion }}
36+
3237 with :
3338 slack_token : ${{ secrets.SLACK_TOKEN }}
3439 method : chat.postMessage
3540 payload : |
3641 channel: ${{ secrets.SLACK_ADDONS_PRODUCTION_CHANNEL }}
42+ text: ${{ env.text }}
3743 blocks:
3844 - type: context
3945 elements:
4046 - type: mrkdwn
41- text: ":github: *Workflow Run:* ${{ github.event.workflow_run.url }}"
47+ text: ${{ env.text }}
48+ - type: mrkdwn
49+ text: ":github: *Workflow Run:* ${{ env.workflow_run_url }}"
50+ - type: mrkdwn
51+ text: ":bust_in_silhouette: *Triggered by:* @${{ github.actor }}"
52+ - type: section
53+ text:
54+ type: mrkdwn
55+ text: >
56+ *Workflow*
57+ event: ${{ github.event.workflow_run.event }}
58+ url: ${{ env.workflow_run_url }}
59+ conclusion: ${{ github.event.workflow_run.conclusion }}
60+
61+ *Commit*
62+ sha: ${{ github.event.workflow_run.head_commit.id }}
63+ message: ${{ github.event.workflow_run.head_commit.message }}
64+ author: ${{ github.event.workflow_run.head_commit.author.name }}
65+ date: ${{ github.event.workflow_run.head_commit.timestamp }}
66+
67+ ${{ github.event.workflow_run.conclusion == 'failure' && env.retry || '' }}
0 commit comments