Skip to content

Commit ebfac67

Browse files
committed
more
1 parent 2c85a66 commit ebfac67

File tree

1 file changed

+33
-6
lines changed

1 file changed

+33
-6
lines changed

.github/workflows/default_completed.yml

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,46 @@ 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 }}
37-
blocks:
42+
text: ${{ env.text }}
43+
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: ""
52+
- type: mrkdwn
53+
text: ":bust_in_silhouette: *Triggered by:* @${{ github.actor }}"
54+
- type: section
55+
text:
56+
text: >
57+
*Workflow*
58+
event: ${{ github.event.workflow_run.event }}
59+
url: ${{ env.workflow_run_url }}
60+
conclusion: ${{ github.event.workflow_run.conclusion }}
61+
62+
*Commit*
63+
sha: ${{ github.event.workflow_run.head_commit.id }}
64+
message: ${{ github.event.workflow_run.head_commit.message }}
65+
author: ${{ github.event.workflow_run.head_commit.author.name }}
66+
date: ${{ github.event.workflow_run.head_commit.timestamp }}
67+
68+
${{ github.event.workflow_run.conclusion == 'failure' && env.retry || '' }}

0 commit comments

Comments
 (0)