diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b347d5b6..cf2d99939 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,10 +4,10 @@ on: # Trigger the workflow on push to master or develop, except tag creation push: branches: - - 'master' - - 'develop' + - "master" + - "develop" tags-ignore: - - '**' + - "**" # Trigger the workflow on pull request pull_request: ~ @@ -82,3 +82,19 @@ jobs: eccodes: ecmwf/eccodes@${{ github.event.pull_request.head.sha || github.sha }} codecov: true 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) }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a40ef52ee..32671d845 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -5,7 +5,7 @@ on: # Run at 20:00 UTC every day (on default branch) schedule: - - cron: '0 20 * * *' + - cron: "0 20 * * *" jobs: test: @@ -14,3 +14,15 @@ jobs: eccodes: ecmwf/eccodes@${{ github.event.pull_request.head.sha || github.sha }} nightly_test: true 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) }} diff --git a/.github/workflows/notify_new_pr.yml b/.github/workflows/notify_new_pr.yml new file mode 100644 index 000000000..737919032 --- /dev/null +++ b/.github/workflows/notify_new_pr.yml @@ -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 }}