Best practices when creating annotations from an action

With v1 you could use GITHUB_ACTION to get the name of the step being run but in v2 this ends up being the user/org + repo name. For xt0rted/stylelint-action it’s  xt0rtedstylelint-action instead of simply “Stylelint” which is what I named the step.

I was using this value when creating checks annotations but now another job step with this action name shows in the list, but there’s nothing there to see.

How do you get the name of the step or job that’s executing?

What are the recommended best practices around creating annotations from inside of an action? I have 2 actions doing this that need to be fixed and 2 more I’m starting to work on.

1 Like

I got the exact same problem! My guess is it’s a bug, so I’ve opened a support request to know more about it.

Here is the reproduction of wrong GITHUB_ACTION name:
https://github.com/Mixgenius/on-push-cat-event/blob/test-github-action-name/.github/workflows/on-push-cat-event.yml

https://github.com/Mixgenius/on-push-cat-event/runs/214685064#step:2:4

FYI @francisfuzz 

This was asked about here as well https://github.com/actions/toolkit/issues/74