diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 705bf7ad..d7215b51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,3 +74,18 @@ jobs: repository: private-downstream-ci event_type: downstream-ci-hpc payload: '{"metkit": "ecmwf/metkit@${{ 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) }} diff --git a/.github/workflows/notify-issues.yml b/.github/workflows/notify-issues.yml new file mode 100644 index 00000000..282bb705 --- /dev/null +++ b/.github/workflows/notify-issues.yml @@ -0,0 +1,14 @@ +name: Notify Issues + +on: + issues: + types: [opened, reopened] + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - name: Notify Issues + uses: ecmwf-actions/notify-teams-issue@v1 + with: + incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }} diff --git a/.github/workflows/notify-pull-request.yml b/.github/workflows/notify-pull-request.yml new file mode 100644 index 00000000..7d1ab72b --- /dev/null +++ b/.github/workflows/notify-pull-request.yml @@ -0,0 +1,14 @@ +name: Notify Pull Request + +on: + pull_request_target: + types: [opened, reopened] + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - name: Notify Pull Request + uses: ecmwf-actions/notify-teams-pr@v1 + with: + incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }}