List of Placeholders to use #25095
-
I would like to add a Discord notification system with GitHub Actions, to notify others about new releases I publish on the repository. I use rjstone/discord-webhook-notify for this. The thing now is, that I want to display details from the release within the webhook message. I know that there are placeholders for several things, but I’m unable to find any kind of cheatsheet to see what placeholders are available for what values. Like I mentioned do I trigger this action on a Release, meaning I want to receive the title, version tag and description of said release, to use. Here’s my current workflow I setup:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You could get release title, version tag and description from the github.event context. Use {{ github.event.release.name }} to get the title, use {{ github.event.release.body }} to get the release description. Please see my example: This is my release information: This is the github.event context showing in debug logs: |
Beta Was this translation helpful? Give feedback.
-
Thanks for the info. I added this but it seems that the workflow returns the error “[error]Cannot read property ‘author’ of undefined”. My guess is that this is because of webhook changes to Discord? I contacted the dev of the Action and see if I get any response. |
Beta Was this translation helpful? Give feedback.
You could get release title, version tag and description from the github.event context. Use {{ github.event.release.name }} to get the title, use {{ github.event.release.body }} to get the release description. Please see my example:
This is my release information:
This is the github.event context showing in debug logs: