docs
docs copied to clipboard
Using an underscore causes GitHub reusable workflow to be not found
Code of Conduct
- [X] I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/using-workflows/reusing-workflows source: https://github.com/github/docs/blob/main/content/actions/using-workflows/reusing-workflows.md
What part(s) of the article would you like to see updated?
Name limitations
Additional information
When a reusable workflow file name has an underscore, GitHub actions cannot "find it" when trying to call it. I had a reusable workflow with the file name docker_build_push_ecr.yml and when I tried to use it, I got this error: error parsing called workflow "{org}/{repo}/.github/workflows/docker_build_push_ecr.yml@main": failed to fetch workflow: workflow was not found.
I renamed the file (and the uses statement) to DockerBuildPushECR.yml and it worked. So it looks like underscore cannot be used. Would be useful to know any other limitations such as this.
Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.
Gxcvh
@mickey-philips Thanks so much for opening an issue! I'll triage this for the team to take a look :eyes:
Our actions team may be a little slow to respond right now, so we appreciate your patience! 💛
👋 Hi @mickey-philips, unfortunately I can't reproduce this problem.
I used a reusable workflow with an underscore and it worked ok:
jobs:
job1:
uses: lucascosti/actions-public-playground/.github/workflows/reusable_workflow.yml@reusable_workflow_with_underscore
It's possible that this was a transient bug that has been fixed, but if you are still having issues, I would recommend contacting GitHub Support.