How to get Workflow url related to the current action? #27114
-
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? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
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. |
Beta Was this translation helpful? Give feedback.
-
Thanks @mickeygousset. I have instead used Github API for getting workflows. |
Beta Was this translation helpful? Give feedback.
Thanks @mickeygousset. I have instead used Github API for getting workflows.