Skip to content

Commit

Permalink
Merge pull request #2262 from input-output-hk/dlachaume/2251/manual-w…
Browse files Browse the repository at this point in the history
…orkflow-for-email-alerts

CI: move `notify-on-failure` to a dedicated workflow
  • Loading branch information
dlachaume authored Jan 30, 2025
2 parents 3b6a2a0 + da23b62 commit 31aa286
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
18 changes: 1 addition & 17 deletions .github/workflows/nightly-dispatcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,6 @@ jobs:
uses: ./.github/workflows/test-client.yml

notify-on-failure:
runs-on: ubuntu-24.04
uses: ./.github/workflows/test-notify-on-failure.yml
needs: [docker-builds, aggregator-stress-test, test-client]
if: failure()
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Make script executable
shell: bash
run: |
chmod +x ./.github/workflows/scripts/notify-nightly-failure.js
- name: Send failure notification by email
uses: peter-evans/sendgrid-action@v1
env:
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }}
SCRIPT_FILEPATH: ./.github/workflows/scripts/notify-nightly-failure.js
SENDGRID_MAIL_FROM: ${{ secrets.CI_NOTIFICATION_EMAIL_FROM }}
SENDGRID_MAIL_TO: ${{ secrets.CI_NOTIFICATION_EMAIL_TO }}
24 changes: 24 additions & 0 deletions .github/workflows/test-notify-on-failure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test Notify on Failure

on:
workflow_dispatch:

jobs:
notify-on-failure:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Make script executable
shell: bash
run: |
chmod +x ./.github/workflows/scripts/notify-nightly-failure.js
- name: Send failure notification by email
uses: peter-evans/sendgrid-action@v1
env:
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }}
SCRIPT_FILEPATH: ./.github/workflows/scripts/notify-nightly-failure.js
SENDGRID_MAIL_FROM: ${{ secrets.CI_NOTIFICATION_EMAIL_FROM }}
SENDGRID_MAIL_TO: ${{ secrets.CI_NOTIFICATION_EMAIL_TO }}

0 comments on commit 31aa286

Please sign in to comment.