Skip to content

opsless/ms-teams-github-actions

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

MS Team Github Actions integration

Usage

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.

  1. Create a Workflows-based incoming webhook in Microsoft Teams and add it as the MS_TEAMS_WEBHOOK_URI secret in your repository's Settings → Secrets and variables → Actions. See Create webhooks using Workflows in the Microsoft Learn docs for instructions.

  2. Add a new step on 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: opsless/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 }}

Known Issues

  • Always set this step with if: always() when there are steps between actions/checkout and this step.

Roadmap

  • 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

About

Github Action to send workflow status notification to Microsoft Teams

Topics

Resources

License

Stars

39 stars

Watchers

3 watching

Forks

Contributors

Generated from actions/typescript-action