Warning
Microsoft has retired the legacy Office 365 connectors / incoming webhooks. URLs that look like https://*.webhook.office.com/... or https://outlook.office.com/webhook/... are no longer delivered. A Workflows-based webhook (below) is required.
-
Create a Workflows-based incoming webhook in Microsoft Teams and add it as the
MS_TEAMS_WEBHOOK_URIsecret in your repository's Settings → Secrets and variables → Actions. See Create webhooks using Workflows in the Microsoft Learn docs for instructions. -
Add a new
stepon your workflow code as last step of workflow job:
name: MS Teams Github Actions integration
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
# ... your build / test / deploy steps go here ...
- uses: telia-actions/ms-teams-github-actions@main
if: always() # to let this step always run even if previous step failed
with:
github-token: ${{ github.token }}
webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}- Always set this step with
if: always()when there are steps betweenactions/checkoutand this step.
- add error message if workflow failed
- add files changed list
- add workflow run duration
Feel free to create issue if you have an idea in mind