Skip to content

Commit b729fef

Browse files
committed
ci: move notify-on-failure to a separate workflow to allow manual execution
1 parent a9886c5 commit b729fef

File tree

2 files changed

+25
-17
lines changed

2 files changed

+25
-17
lines changed

.github/workflows/nightly-dispatcher.yml

+1-17
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-22.04
24+
uses: ./.github/workflows/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 }}
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Notify on Failure
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
notify-on-failure:
8+
runs-on: ubuntu-22.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)