You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Microsoft Teams Deploy Card
2.1.2
A comprehensive notification card in Microsoft Teams for your deployments.
- 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.
- Add a new
step
on your workflow code belowactions/checkout@v2
:
name: MS Teams Deploy Card
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# this is the new step
- name: Notify dedicated teams channel
uses: toko-bifrost/ms-teams-deploy-card@master # or "./" if in a local set-up
with:
github-token: ${{ github.token }}
webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
- Tweak the following configurations
github-token
- (required), this can be set to the following:${{ github.token }}
${{ secrets.GITHUB_TOKEN }}
- a manually added secret with more Github API permissions, e.g.
${{ secrets.<custom secret here> }}
webhook-uri
- (required), the value ofMS_TEAMS_WEBHOOK_URI
deploy-title
- (optional, defaults toGithub Actions CI
),allowed-file-len
- (optional, defaults to7
), allowed number of changed files to displaytimezone
- (optional, defaults toUTC
), a valid database timezone name, e.g. "Australia/Sydney"
- Clone this repository.
- Install JS dependencies via
yarn install
ornpm install
. - Before pushing you changes, execute
yarn ncc
(ornpm run ncc
) to create a build ondist
. - Do not remove the
dist
repository. Ever. - Check the Actions tab for the errors if there are any.
- Avoid naming your secrets with the prefix
GITHUB_
as secrets are being used as environment variables, and they are reserved for Github Actions' use only. Better stick withCI_GITHUB_TOKEN
. - As this is still in development, always use the working latest version from the
Releases
, as they have more bug fixes and added features.