workflow-teams-webhook

command module
v0.0.0-...-5ce4db1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2020 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

workflow-teams-webhook

Post GitHub workflow events to a Microsoft Teams webhook

Configuration:

  • Create your incoming webhook in Microsoft Teams.
  • Optionally store the webhook URL in a secret (e.g. MSTEAMS_NOTIFY_HOOK_URL)
  • Run only after ensuring Go is on the Runner (uses: actions/setup-go)
  • Create your workflow yaml, running on any scenarios you want to notify about (See Workflow syntax and Events that trigger workflows)
  • Specify the secret or webhook URL in your workflow configuration:
on:
  push:
  pull_request:
  release:
  check_run:
  create:
  delete:
  public:
  pull_request:
  pull_request_review:
  pull_request_review_comment:

jobs:
  notify:
    name: "Notify Microsoft Teams"
    steps:
    - uses: actions/setup-go@v2
      with:
        go-version: '~1.14'
    # ...
    - uses: MichaelUrman/workflow-teams-webhook@tip # or use a sha
      with:
        hookurl: ${{ secrets.MSTEAMS_NOTIFY_HOOK_URL }}

For reporting CI results, add a step after your CI step with if: always() and a job-status like this:

jobs:
  ci_test:
    name "Integration Tests"
    steps:
    - uses: actions/setup-go@v2
      with:
        go-version: '~1.14'

    # step here that runs integration tests

    - uses: MichaelUrman/workflow-teams-webhook@tip
      if: always()
      with:
        hookurl: ${{ secrets.MSTEAMS_NOTIFY_HOOK_URL }}
        job-status: ${{ job.status }}

Alternately, you can report a specific step's outcome as the job-status:

      with:
        hookurl: ${{ secrets.MSTEAMS_NOTIFY_HOOK_URL }}
        job-status: ${{ steps.stepname.outcome }}

Documentation

Overview

Command Notify is a small webhook client that forms and posts a Microsof Teams webhook request to notify about GitHub workflow events.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址