Skip to content

Commit 02c1cfd

Browse files
committed
more
1 parent 2c85a66 commit 02c1cfd

File tree

2 files changed

+45
-24
lines changed

2 files changed

+45
-24
lines changed

.github/workflows/default.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,24 @@ jobs:
5656
echo "string=${{ inputs.string || 'goodbye' }}" >> $GITHUB_OUTPUT
5757
echo "optional=${{ inputs.optional }}" >> $GITHUB_OUTPUT
5858
59-
call_worker:
60-
needs: context
61-
uses: ./.github/workflows/worker.yml
62-
secrets:
63-
token: ${{ github.token }}
64-
with:
65-
boolean: ${{ fromJson(needs.context.outputs.boolean) }}
66-
number: ${{ fromJson(needs.context.outputs.number) }}
67-
string: ${{ needs.context.outputs.string }}
68-
optional: ${{ needs.context.outputs.optional }}
59+
# call_worker:
60+
# needs: context
61+
# uses: ./.github/workflows/worker.yml
62+
# secrets:
63+
# token: ${{ github.token }}
64+
# with:
65+
# boolean: ${{ fromJson(needs.context.outputs.boolean) }}
66+
# number: ${{ fromJson(needs.context.outputs.number) }}
67+
# string: ${{ needs.context.outputs.string }}
68+
# optional: ${{ needs.context.outputs.optional }}
6969

70-
read_worker:
71-
needs: call_worker
72-
runs-on: ubuntu-latest
70+
# read_worker:
71+
# needs: call_worker
72+
# runs-on: ubuntu-latest
7373

74-
steps:
75-
- shell: bash
76-
run: |
77-
cat <<EOF
78-
${{ toJson(needs.call_worker) }}
79-
EOF
74+
# steps:
75+
# - shell: bash
76+
# run: |
77+
# cat <<EOF
78+
# ${{ toJson(needs.call_worker) }}
79+
# EOF

.github/workflows/default_completed.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,40 @@ 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+
is_release_master: ${{ needs.context.outputs.is_release_master }}
30+
event: ${{ github.event_name }}
31+
conclusion: ${{ github.event.workflow_run.conclusion }}
32+
emoji: ${{ env.conclusion == 'success' && ':white_check_mark:' || ':x:' }}
33+
workflow_id: ${{ github.event.workflow_run.id }}
34+
workflow_url: ${{ github.event.workflow_run.url }}
35+
text_template: '{1} {2} completed with {3}'
36+
retry_template: '[Rerun Workflow]({1})'
37+
workflow_template: ':github: *Workflow Run:* [{1}]({2})'
38+
triggered_template: ':bust_in_silhouette: *Triggered by:* @{1}'
39+
3240
with:
3341
slack_token: ${{ secrets.SLACK_TOKEN }}
3442
method: chat.postMessage
3543
payload: |
3644
channel: ${{ secrets.SLACK_ADDONS_PRODUCTION_CHANNEL }}
45+
text: ${{ format(env.text_template, env.emoji, env.event, env.conclusion) }}
3746
blocks:
3847
- type: context
3948
elements:
4049
- type: mrkdwn
41-
text: ":github: *Workflow Run:* ${{ github.event.workflow_run.url }}"
50+
text: ${{ format(env.text_template, env.emoji, env.event, env.conclusion) }}
51+
- type: mrkdwn
52+
text: ${{ format(env.workflow_template, env.workflow_id, env.workflow_url) }}
53+
- type: mrkdwn
54+
text: ${{ format(env.triggered_template, github.actor) }}
55+
# ${{ github.event.workflow_run.conclusion == 'failure' && format('
56+
# - type: section
57+
# text:
58+
# type: mrkdwn
59+
# text: ${{ format(env.retry_template, github.event.workflow_run.rerun_url) }}
60+
# ')}}
61+
62+

0 commit comments

Comments
 (0)