Triggering the action based on the Label on the Issue
Description
I am looking for a solution where the github action can only be triggered based on the label associated to the issue created in Github.
The use case is we are trying to trigger the workflow to send a message to slack based on a specific label attached to the issue.
What type of issue is this? (place an x in one of the [ ])
- [ ] bug
- [ ] enhancement (feature request)
- [x] question
- [ ] documentation related
- [ ] example code related
- [ ] testing related
- [ ] discussion
Requirements (place an x in each of the [ ])
- [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
- [x] I've read and agree to the Code of Conduct.
- [x] I've searched for any related issues and avoided creating a duplicate issue.
Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
package version:
node version:
OS version(s):
Steps to reproduce:
Expected result:
What you expected to happen
Actual result:
What actually happened
Attachments:
Logs, screenshots, screencast, sample project, funny gif, etc.
Hi @meolivar,
It sounds like you might want to try configuring this workflow action to be triggered by the issues event payload with the activity type labeled. Github docs on that here are very helpful and contain some setup configuration which you can add to your workflow.
on:
issues:
types: [labeled, unlabeled]
👋 An example workflow showcasing this and a few more steps with slackapi/slack-github-action@v2 is now included!