https://github.com/sitkoru/ms-teams-release-notification
https://github.com/sitkoru/ms-teams-release-notification
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sitkoru/ms-teams-release-notification
- Owner: sitkoru
- License: mit
- Created: 2020-10-01T13:17:50.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-26T15:02:27.000Z (over 3 years ago)
- Last Synced: 2025-01-13T15:15:17.971Z (over 1 year ago)
- Language: TypeScript
- Size: 837 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Microsoft Teams Release Notification
A GitHub Action that sends release notifications to a Microsoft Teams channel.
## Usage
1. Add `MS_TEAMS_WEBHOOK_URI` on your repository's configs on Settings > Secrets. It is the [Webhook URI](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook) of the dedicated Microsoft Teams channel for notification.
2) Add a new `step` on your workflow code below `actions/checkout@v2`:
```yaml
name: MS Teams Notification
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# this is the new step using the ms-teams-release-notification action
- name: Notify about release
uses: sitkoru/ms-teams-release-notification@v1
with:
github-token: ${{ github.token }} # this will use the runner's token.
ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
ms-teams-card-summary: New release
ms-teams-card-title: Release title
notification-color: 17a2b8
timezone: America/Denver
```
3. Configure it with the following inputs:
- `github-token` - (required), set to the following:
- `${{ github.token }}`
- `ms-teams-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](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) or [Microsoft Teams Incoming Webhook](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook).
- `ms-teams-card-summary` - (optional), card summary. Be default - `New release of repoName: tag`
- `ms-teams-card-title` - (optional), card title. Be default same as summary.
- `notification-color` (optional), Custom color to help distinguish type of notification. Can be any [HEX color](https://html-color.codes/). (ex. **007bff** or **17a2b8** for info, **28a745** success, **ffc107** warning, **dc3545** error, etc.)
- `timezone` - (optional, defaults to `UTC`), a [valid database timezone name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), (ex. Australia/Sydney or America/Denver, etc.)
# Authors
- Based on [jdcargile/ms-teams-notification](https://github.com/jdcargile/ms-teams-notification)