Add Teams notifications for CI and new PRs

This commit is contained in:
Daniel Tipping 2023-05-05 11:45:10 +01:00 committed by shahramn
parent 6cf7a3f24f
commit 3ce74a4c53
3 changed files with 47 additions and 4 deletions

View File

@ -4,10 +4,10 @@ on:
# Trigger the workflow on push to master or develop, except tag creation # Trigger the workflow on push to master or develop, except tag creation
push: push:
branches: branches:
- 'master' - "master"
- 'develop' - "develop"
tags-ignore: tags-ignore:
- '**' - "**"
# Trigger the workflow on pull request # Trigger the workflow on pull request
pull_request: ~ pull_request: ~
@ -82,3 +82,19 @@ jobs:
eccodes: ecmwf/eccodes@${{ github.event.pull_request.head.sha || github.sha }} eccodes: ecmwf/eccodes@${{ github.event.pull_request.head.sha || github.sha }}
codecov: true codecov: true
secrets: inherit secrets: inherit
notify:
runs-on: ubuntu-latest
needs:
- downstream-ci
- private-downstream-ci
- downstream-ci-hpc
- private-downstream-ci-hpc
- codecov
if: always()
steps:
- name: Trigger Teams notification
uses: ecmwf-actions/notify-teams@v1
with:
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }}
needs_context: ${{ toJSON(needs) }}

View File

@ -5,7 +5,7 @@ on:
# Run at 20:00 UTC every day (on default branch) # Run at 20:00 UTC every day (on default branch)
schedule: schedule:
- cron: '0 20 * * *' - cron: "0 20 * * *"
jobs: jobs:
test: test:
@ -14,3 +14,15 @@ jobs:
eccodes: ecmwf/eccodes@${{ github.event.pull_request.head.sha || github.sha }} eccodes: ecmwf/eccodes@${{ github.event.pull_request.head.sha || github.sha }}
nightly_test: true nightly_test: true
secrets: inherit secrets: inherit
notify:
runs-on: ubuntu-latest
needs:
- test
if: always()
steps:
- name: Trigger Teams notification
uses: ecmwf-actions/notify-teams@v1
with:
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }}
needs_context: ${{ toJSON(needs) }}

15
.github/workflows/notify_new_pr.yml vendored Normal file
View File

@ -0,0 +1,15 @@
name: Notify new PR
on:
pull_request_target:
types:
- "opened"
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify new PR
uses: ecmwf-actions/notify-teams-pr@v1
with:
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }}