Skip to content

Commit 0a47d2b

Browse files
authored
Merge branch 'master' into 15660-devhub-version-rollback
2 parents 392d7c5 + c9b8d67 commit 0a47d2b

File tree

154 files changed

+10926
-8742
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+10926
-8742
lines changed

.github/workflows/_health_check.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ on:
1717
description: Whether to notify the user of the health check outcome
1818
type: boolean
1919
required: false
20+
slack_channel:
21+
description: The Slack channel to send notifications to
22+
type: string
23+
required: false
2024
secrets:
2125
SLACK_TOKEN:
2226
description: The Slack token to use for notifications
@@ -37,6 +41,10 @@ on:
3741
description: Whether to notify the user of the health check outcome
3842
type: boolean
3943
required: false
44+
slack_channel:
45+
description: The Slack channel to send notifications to
46+
type: string
47+
required: false
4048

4149
env:
4250
health_check_file: health_check.json
@@ -46,6 +54,7 @@ jobs:
4654
context:
4755
runs-on: ubuntu-latest
4856
outputs:
57+
slack_channel: ${{ steps.environment.outputs.slack_channel }}
4958
notify: ${{ steps.environment.outputs.notify }}
5059
environment: ${{ steps.environment.outputs.environment }}
5160

@@ -55,6 +64,7 @@ jobs:
5564
env:
5665
notify: ${{ inputs.notify }}
5766
environment: ${{ inputs.environment }}
67+
slack_channel: ${{ inputs.slack_channel }}
5868
run: |
5969
if [[ "$environment" == "prod" ]]; then
6070
environment="prod"
@@ -66,8 +76,11 @@ jobs:
6676
environment="host"
6777
fi
6878
69-
echo "notify=$notify" >> "$GITHUB_OUTPUT"
70-
echo "environment=$environment" >> "$GITHUB_OUTPUT"
79+
{
80+
echo "notify=$notify"
81+
echo "slack_channel=$slack_channel"
82+
echo "environment=$environment"
83+
} >> "$GITHUB_OUTPUT"
7184
cat "$GITHUB_OUTPUT"
7285
7386
health_check:
@@ -125,13 +138,13 @@ jobs:
125138
cat "$GITHUB_OUTPUT"
126139
127140
- name: Notify Failure
128-
if: steps.blocks.outcome == 'success'
129-
uses: mozilla/addons/.github/actions/slack@2406c44b0b624bcf6b9b2a8a6368c32ada25af66
141+
if: steps.blocks.outcome == 'success' && needs.context.outputs.slack_channel != ''
142+
uses: mozilla/addons/.github/actions/slack@aa3c320008a837a8faa40badb88006421f63efdb
130143
with:
131144
slack_token: ${{ secrets.SLACK_TOKEN }}
132145
payload: |
133146
{
134-
"channel": "${{ vars.SLACK_ADDONS_PRODUCTION_CHANNEL }}",
147+
"channel": "${{ needs.context.outputs.slack_channel }}",
135148
"blocks": ${{ toJson(steps.blocks.outputs.blocks) }},
136149
"text": "[${{ needs.context.outputs.environment }}] Health check ${{ steps.health_check.outcome }}",
137150
# Don't unfurl links or media

.github/workflows/_test_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
is_fork: ${{ steps.context.outputs.is_fork }}
4141
steps:
4242
- id: context
43-
uses: mozilla/addons/.github/actions/context@2406c44b0b624bcf6b9b2a8a6368c32ada25af66
43+
uses: mozilla/addons/.github/actions/context@aa3c320008a837a8faa40badb88006421f63efdb
4444

4545
test_check:
4646
runs-on: ubuntu-latest

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
steps:
4545
- name: Set context
4646
id: context
47-
uses: mozilla/addons/.github/actions/context@2406c44b0b624bcf6b9b2a8a6368c32ada25af66
47+
uses: mozilla/addons/.github/actions/context@aa3c320008a837a8faa40badb88006421f63efdb
4848

4949
- name: Git Reference
5050
id: git
@@ -116,7 +116,7 @@ jobs:
116116
- name: Login to Dockerhub
117117
if: needs.context.outputs.is_fork == 'false'
118118
id: docker_hub
119-
uses: mozilla/addons/.github/actions/login-docker@2406c44b0b624bcf6b9b2a8a6368c32ada25af66
119+
uses: mozilla/addons/.github/actions/login-docker@aa3c320008a837a8faa40badb88006421f63efdb
120120
with:
121121
username: ${{ secrets.DOCKER_USER }}
122122
password: ${{ secrets.DOCKER_PASS }}
@@ -234,6 +234,7 @@ jobs:
234234
uses: ./.github/workflows/_health_check.yml
235235
with:
236236
environment: host
237+
slack_channel: ${{ vars.SLACK_ADDONS_PRODUCTION_CHANNEL }}
237238

238239
test:
239240
needs: build
@@ -271,7 +272,7 @@ jobs:
271272

272273
- name: Login to Dockerhub
273274
id: docker_hub
274-
uses: mozilla/addons/.github/actions/login-docker@2406c44b0b624bcf6b9b2a8a6368c32ada25af66
275+
uses: mozilla/addons/.github/actions/login-docker@aa3c320008a837a8faa40badb88006421f63efdb
275276
with:
276277
username: ${{ secrets.DOCKER_USER }}
277278
password: ${{ secrets.DOCKER_PASS }}
@@ -308,7 +309,7 @@ jobs:
308309

309310
- name: Login to GAR
310311
id: docker_gar
311-
uses: mozilla/addons/.github/actions/login-gar@2406c44b0b624bcf6b9b2a8a6368c32ada25af66
312+
uses: mozilla/addons/.github/actions/login-gar@aa3c320008a837a8faa40badb88006421f63efdb
312313
with:
313314
registry: ${{ env.registry }}
314315
service_account: ${{ secrets.GAR_PUSHER_SERVICE_ACCOUNT_EMAIL }}
@@ -323,11 +324,10 @@ jobs:
323324
version: ${{ needs.context.outputs.docker_version }}
324325
push: true
325326

326-
327327
notification:
328328
runs-on: ubuntu-latest
329329
name: Notification (${{ matrix.name }})
330-
if: always()
330+
if: needs.context.outputs.is_fork == 'false' && always()
331331
needs: [context, push_dockerhub, push_gar]
332332
strategy:
333333
matrix:
@@ -342,7 +342,7 @@ jobs:
342342
steps:
343343

344344
- name: Slack Notification
345-
uses: mozilla/addons/.github/actions/slack-workflow-notification@2406c44b0b624bcf6b9b2a8a6368c32ada25af66
345+
uses: mozilla/addons/.github/actions/slack-workflow-notification@aa3c320008a837a8faa40badb88006421f63efdb
346346
with:
347347
slack_token: ${{ secrets.SLACK_TOKEN }}
348348
slack_channel: ${{ vars.SLACK_ADDONS_PRODUCTION_CHANNEL }}

.github/workflows/health_check.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
steps:
2626
- name: Context
2727
id: context
28-
uses: mozilla/addons/.github/actions/context@2406c44b0b624bcf6b9b2a8a6368c32ada25af66
28+
uses: mozilla/addons/.github/actions/context@aa3c320008a837a8faa40badb88006421f63efdb
2929

3030
health_check:
3131
strategy:
@@ -42,6 +42,7 @@ jobs:
4242
with:
4343
environment: ${{ matrix.environment }}
4444
notify: ${{ github.event_name == 'schedule' }}
45+
slack_channel: ${{ vars.SLACK_ADDONS_PRODUCTION_CHANNEL }}
4546

4647
post_health_check:
4748
if: always()
@@ -65,7 +66,7 @@ jobs:
6566
gh workflow run health_check.yml --ref "${ref}"
6667
6768
- name: Notify Recovery
68-
uses: mozilla/addons/.github/actions/slack@2406c44b0b624bcf6b9b2a8a6368c32ada25af66
69+
uses: mozilla/addons/.github/actions/slack@aa3c320008a837a8faa40badb88006421f63efdb
6970
with:
7071
slack_token: ${{ secrets.SLACK_TOKEN }}
7172
payload: |
@@ -76,7 +77,7 @@ jobs:
7677
dry_run: ${{ !(needs.health_check.result == 'success' && github.event_name == 'workflow_dispatch') }}
7778

7879
- name: Notify Failure
79-
uses: mozilla/addons/.github/actions/slack-workflow-notification@2406c44b0b624bcf6b9b2a8a6368c32ada25af66
80+
uses: mozilla/addons/.github/actions/slack-workflow-notification@aa3c320008a837a8faa40badb88006421f63efdb
8081
with:
8182
slack_token: ${{ secrets.SLACK_TOKEN }}
8283
slack_channel: ${{ vars.SLACK_ADDONS_PRODUCTION_CHANNEL }}

0 commit comments

Comments
 (0)