ravsamhq / notify-slack-action

🔔 Send a Slack Notification from Github Actions regarding failure, warnings, or even success.
https://ravsam.in/blog/send-slack-notification-when-github-actions-fails/
MIT License
173 stars 57 forks source link

Is it possible to change the emoji_icon? #30

Closed ksafranski closed 2 years ago

ksafranski commented 2 years ago

Love this action, only thing is it defaults to whatever slack has set for the avatar/emoji_icon. Is there a way to set that currently?

ravsam-bot[bot] commented 2 years ago

Hello and welcome to RavSam :purple_heart:. Thanks for opening your first issue. I will assign one of our team members to take a look at the problem you have raised. Make sure to include as much information as possible to help our team diagnose the issue and solve it quickly.

If the problem is related to a security concern, please feel free to email us at info@ravsam.in.

smetroid commented 2 years ago

@ksafranski if you have the ability/permissions you can chance the avatar/emoji_icon in the slack webhook configuration.

ravgeetdhillon commented 2 years ago

Hey @ksafranski,

This feature has been added to release 1.7.0.

You can now customize the action emojis based on the status event:

steps:
  - uses: ravsamhq/notify-slack-action@v1
    if: always()
    with:
      status: ${{ job.status }}
      ...
      icon_success: ':heavy_check_mark:'
      icon_failure: ':x:'
      icon_warnings: ':large_orange_diamond:'
    env:
      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

Let me know if this solves your issue.

ksafranski commented 2 years ago

That's perfect, thanks