Skip to content

JChrist/google-chat-github-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Google Chat GitHub Action

Google Chat Github Action CI Coverage

Send a notification to Google Chat with the result of a GitHub Action, using Cards V2

Preview

Default (non-collapsible):

preview_default.png

Collapsed:

preview_collapsed.png

Expanded:

preview_expanded.png

Example

- name: Google Chat Notification
  uses: jchrist/google-chat-github-action@v1
  with:
    name: Build
    url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
    status: ${{ job.status }}
  if: always()
  # this allows the build to succeed even when the notification fails
  # e.g. due to dependabot push, which may not have the secret
  continue-on-error: true

Usage

- name: Google Chat Notification
  uses: jchrist/google-chat-github-action@v1
  with:
    # The name of the job. Used in the card title
    # Required
    name: Build
    # Google Chat Webhook URL
    # Required
    url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
    # Job status. It may be one of `success`, `failure`, `cancelled`. 
    # It's recommended to be set as: `${{ job.status }}`
    # Required
    status: ${{ job.status }}
    # The number of widgets in the card section that are not collapsible
    # Defaults to -1: card is not collapsible.
    # Valid values:
    #   *no value/omitted*: the default value
    #  `number`: the number of widgets that are not collapsible. If negative, the card is not collapsible.
    # Optional
    collapse: 1
  if: always()
  # this allows the build to succeed even when the notification fails
  # e.g. due to dependabot push, which may not have the secret
  continue-on-error: true

About

Send notification to Google Chat from a GitHub Action

Resources

License

Stars

Watchers

Forks

Packages

No packages published