Skip to content

Commit 7ece8c2

Browse files
committed
more
1 parent 2c85a66 commit 7ece8c2

File tree

2 files changed

+52
-30
lines changed

2 files changed

+52
-30
lines changed

.github/workflows/default.yml

+19-19
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

+33-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Default (completed)
22

33
on:
44
workflow_run:
5-
workflows: 'Default'
5+
workflows: ['Default', 'Release']
66
types:
77
- completed
88

@@ -16,26 +16,48 @@ jobs:
1616

1717
steps:
1818
- uses: actions/checkout@v4
19+
- uses: ./.github/actions/context
1920

2021
notify_slack:
2122
runs-on: ubuntu-latest
2223
needs: [context]
23-
# 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
28+
2929
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' }}
30+
event: ${{ github.event.workflow_run.event }}
31+
conclusion: ${{ github.event.workflow_run.conclusion }}
32+
emoji: ${{ github.event.workflow_run.conclusion == 'success' && ':white_check_mark:' || ':x:' }}
33+
workflow_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}
34+
workflow_id: ${{ github.event.workflow_run.id }}
3235
with:
3336
slack_token: ${{ secrets.SLACK_TOKEN }}
3437
method: chat.postMessage
3538
payload: |
36-
channel: ${{ secrets.SLACK_ADDONS_PRODUCTION_CHANNEL }}
39+
channel: "${{ secrets.SLACK_ADDONS_PRODUCTION_CHANNEL }}"
40+
text: "${{ env.event }} completed with ${{ env.conclusion }}"
3741
blocks:
38-
- type: context
39-
elements:
40-
- type: mrkdwn
41-
text: ":github: *Workflow Run:* ${{ github.event.workflow_run.url }}"
42+
- type: section
43+
text:
44+
type: mrkdwn
45+
text: "${{ env.emoji }} *${{ env.event }}* completed with *${{ env.conclusion }}*"
46+
- type: context
47+
elements:
48+
- type: mrkdwn
49+
text: "*Workflow:* ${{ env.workflow_id }}"
50+
- type: mrkdwn
51+
text: "*Actor:* ${{ github.event.workflow_run.actor.login }}"
52+
- type: mrkdwn
53+
text: "*Commit:* ${{ github.event.workflow_run.head_commit.id }}"
54+
- type: actions
55+
elements:
56+
- type: button
57+
text:
58+
type: plain_text
59+
text: "View Workflow"
60+
emoji: true
61+
value: workflow_url
62+
url: ${{ env.workflow_url }}
63+

0 commit comments

Comments
 (0)