This GitHub action is designed to enable development teams to easily send notifications to an MS Teams channel from their build pipelines.
This action uses typescript and is built from the typescript-action baseline
This action can be called as part of your GitHub action workflows. to achieve this follow these steps:
Add the following section to your existing workflow file:
- name: Testing action to notify Teams
uses: nhs-england-tools/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
teams-webhook-url: ${{ secrets.TEAMS_WEBHOOK_URL }}
message-title: "Replace with an appropriate title"
message-text: "Replace with appropriate text"
link: https://google.com
Follow the instructions to add an Incoming Webhook to the Teams channel of your choice.
Add the webhook URL from above as a repository secret with the following name:
TEAMS_WEBHOOK_URL
Clone the repository
git clone https://github.com/nhs-england-tools/notify-msteams.git
cd nhs-england-tools/notify-msteams
Install and configure toolchain dependencies
make config
The following software packages or their equivalents are expected to be installed
The steps above detail how to quickly use this action within your repository. The following attributes can be provided to further control the output of your notification:
- github-token - use the default GitHub token
- teams-webhook-url - this is the URL provided by MS Teams when you configured the incoming webhook
- message-title - the title for your message - this will be displayed in the notification
- message-text - the text for your message - this will be displayed in the notification
- message-colour - The colour to use for the header line in the notification
- link - optional if required provide a link to be presented in the notification
An example of how the notification could appear in Microsoft Teams is provided:
Provide a way to contact the owners of this project. It can be a team, an individual or information on the means of getting in touch via active communication channels, e.g. opening a GitHub discussion, raising an issue, etc.
The LICENCE.md file will need to be updated with the correct year and owner
Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation.
Any HTML or Markdown documentation is Β© Crown Copyright and available under the terms of the Open Government Licence v3.0.