Skip to content

Commit

Permalink
Add notifications to github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
geier1993 authored and wdeconinck committed Jun 6, 2024
1 parent 2c0ef04 commit b2ca93b
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,20 @@ jobs:
repository: private-downstream-ci
event_type: downstream-ci-hpc
payload: '{"atlas": "ecmwf/atlas@${{ github.event.pull_request.head.sha || github.sha }}"}'


notify:
runs-on: ubuntu-latest
needs:
- downstream-ci
- private-downstream-ci
- downstream-ci-hpc
- private-downstream-ci-hpc
if: always() && ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
steps:
- name: Trigger Teams notification
uses: ecmwf-actions/notify-teams@v1
with:
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }}
needs_context: ${{ toJSON(needs) }}

15 changes: 15 additions & 0 deletions .github/workflows/notify-new-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Notify new issue

on:
issues:
types:
- "opened"

jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify new issue
uses: ecmwf-actions/notify-teams-issue@v1
with:
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }}
16 changes: 16 additions & 0 deletions .github/workflows/notify-new-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Notify new PR

# Needs the worklow to be located in the branche the PR is merged to
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 }}

0 comments on commit b2ca93b

Please sign in to comment.