How to get Workflow url related to the current action?

I am building an actions workflow. In the action, I would love to get the path of the workflow file that is responsible for running this action?


Using the github context object, you can get the display name of the workflow: ${{ github.workflow }}

But I can’t find anything that gives you the file name.

As far as getting the path, all workflow files are in the .github/workflows folder, so a hack would be to set the display name of your workflow file to be the same as the actual file name, then could get the information you want.


Thanks @mickeygousset. I have instead used Github API for getting workflows.

1 Like