Skip to content

IMGARENA/slack_notify

 
 

Repository files navigation

typescript-action status

Slack notification action.

Usage

Example

- name: Slack Notification
  uses: IMGARENA/slack_notify@v1.1.4
  env:
    SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
    SLACK_ICON_URL: 'https://github.com/imgarena.png'
    SLACK_USERNAME: 'IMG Arena'
    SLACK_GITHUB_USER_PAIRS: ${{ secrets.SLACK_USER }}
    TITLE: ':tada: Congratulations ${{ github.actor }} :tada:'
    BODY: "Your recent action _*${{ github.workflow }}*_ has been built successfully! \n>This is *markdown* :partyparrot:"
    COLOR: '#FF0000'

img.png

Environment Variables

Required

  • SLACK_WEBHOOK_URL

    Slack Incoming webhook URL.

Optional

  • SLACK_ICON_URL

    User icon image URL.

  • SLACK_USERNAME

    Username.

  • CHANNEL_NAME

    Channel name

  • SLACK_GITHUB_USER_PAIRS

    An environment variable to use when you want to connect a GitHub user to a Slack user. Save it in CSV format and replace it with a specific user name when it exists. Github usernames are case-insensitive.

    Like this.

    asarco,ABCDEFJ
    paul,ZXCVBNMK
    ...
    

    ※ You need to specify a user ID when connecting Slack users.

    What is this

  • TITLE

    Message Title.

  • BODY

    Message Body.

  • COLOR

    Attachment color. This will be shown left side of message.

  • USE_MARKDOWN

    Allow using markdown on the body of the message. Default true. Use double quotes in the body if you want to add markdown.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 97.4%
  • JavaScript 2.6%