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

Conditional post w.r.t. branch #106

Closed rmitsch closed 10 months ago

rmitsch commented 1 year ago

Very useful action, thanks! I was wondering whether it's possible to post to Slack only if the workflow is triggered for a certain branch, e. g. main?

ravsam-bot[bot] commented 1 year 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, then please delete this issue and send us an email at info@ravsam.in.

ravgeetdhillon commented 1 year ago

@rmitsch You can fix this issue by adding an if condition to the step that calls this action. For more details on implementation, check out this discussion.

ravgeetdhillon commented 10 months ago

@rmitsch Were you able to solve your issue? If not, you can check out the documentation. I am sure it will solve your issue.

I am going to close this issue but be free to open it if your issue isn't resolved.