Skip to content

Commit 31aa286

Browse files
authored
Merge pull request #2262 from input-output-hk/dlachaume/2251/manual-workflow-for-email-alerts
CI: move `notify-on-failure` to a dedicated workflow
2 parents 3b6a2a0 + da23b62 commit 31aa286

File tree

2 files changed

+25
-17
lines changed

2 files changed

+25
-17
lines changed

.github/workflows/nightly-dispatcher.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,6 @@ jobs:
2121
uses: ./.github/workflows/test-client.yml
2222

2323
notify-on-failure:
24-
runs-on: ubuntu-24.04
24+
uses: ./.github/workflows/test-notify-on-failure.yml
2525
needs: [docker-builds, aggregator-stress-test, test-client]
2626
if: failure()
27-
steps:
28-
- name: Checkout repository
29-
uses: actions/checkout@v4
30-
31-
- name: Make script executable
32-
shell: bash
33-
run: |
34-
chmod +x ./.github/workflows/scripts/notify-nightly-failure.js
35-
36-
- name: Send failure notification by email
37-
uses: peter-evans/sendgrid-action@v1
38-
env:
39-
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }}
40-
SCRIPT_FILEPATH: ./.github/workflows/scripts/notify-nightly-failure.js
41-
SENDGRID_MAIL_FROM: ${{ secrets.CI_NOTIFICATION_EMAIL_FROM }}
42-
SENDGRID_MAIL_TO: ${{ secrets.CI_NOTIFICATION_EMAIL_TO }}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Test Notify on Failure
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
notify-on-failure:
8+
runs-on: ubuntu-24.04
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v4
12+
13+
- name: Make script executable
14+
shell: bash
15+
run: |
16+
chmod +x ./.github/workflows/scripts/notify-nightly-failure.js
17+
18+
- name: Send failure notification by email
19+
uses: peter-evans/sendgrid-action@v1
20+
env:
21+
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }}
22+
SCRIPT_FILEPATH: ./.github/workflows/scripts/notify-nightly-failure.js
23+
SENDGRID_MAIL_FROM: ${{ secrets.CI_NOTIFICATION_EMAIL_FROM }}
24+
SENDGRID_MAIL_TO: ${{ secrets.CI_NOTIFICATION_EMAIL_TO }}

0 commit comments

Comments
 (0)