Coder Social home page Coder Social logo

graffino / graffino-teams-notification Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 1.54 MB

A GitHub Action that sends customizable notifications to a dedicated Microsoft Teams channel.

Home Page: https://graffino.com

License: MIT License

TypeScript 41.23% JavaScript 58.77%
github github-actions typescript yaml-configuration

graffino-teams-notification's Introduction

Microsoft Teams Notification

Build Status

A GitHub Action that sends customizable notifications to a dedicated Microsoft Teams channel.

Usage

  1. Add MS_TEAMS_WEBHOOK_URI on your repository's configs on Settings > Secrets. It is the Webhook URI of the dedicated Microsoft Teams channel for notification.

  2. Add a new step on your workflow code below actions/checkout@v2:

name: Graffino Teams Notification

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Workflow Start
        uses: Graffino/Graffino-Teams-Notification@v2
        with:
          github-token: ${{ github.token }} 
          ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
          notification-summary: "Your custom notification message including emoji. E.g 'Workflow start ๐Ÿš€'"
          timezone: Europe/Bucharest

[...]
      - name: Workflow End
        uses: Graffino/Graffino-Teams-Notification@v2
        with:
          github-token: ${{ github.token }} 
          job: ${{ toJson(job) }}
          ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
          notification-summary: "Workflow end: ${{ job.status }}"          
          timezone: Europe/Bucharest
  1. Make it your own with the following configurations.
    • github-token - (required), set to the following:
      • ${{ github.token }}
    • webhook-uri - (required), setup a new secret to store your Microsoft Teams Webhook URI (ex. MS_TEAMS_WEBHOOK_URI). Learn more about setting up GitHub Secrets or Microsoft Teams Incoming Webhook.
    • notification-summary (required), Your custom notification message (ex. Deployment Started or Build Successful)
    • timezone - (optional, defaults to UTC), a valid database timezone name, (ex. Australia/Sydney or America/Denver, etc.)
    • timeout - (optional, defaults to 5s), this prevents action from getting stuck when Teams WebHooks misbehave.
    • job - Shoud contain the stringified object for the current job, used to get the job status and display notification accordingly. You can get it using job: ${{ toJson(job) }}

Examples

Here's how it wil look:

Notification screenshot

graffino-teams-notification's People

Contributors

zenopopovici avatar jdcargile avatar denisahalmaghi avatar dependabot[bot] avatar falnyr avatar

Stargazers

Roxana Anghel avatar

Watchers

 avatar Nick Ciolpan avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.