I have a special use case where I store a workflow file somewhere deep in a repository (and I don’t want to move it). I would like to execute this workflow in my actions.
I was thinking of having a regular workflow defined in .github/workflows which would call my other workflow file. A similar feature is possible for actions via - uses: ./custom_path where there’s a ./custom_path/action.yml file.
Is there a way to do the same with a workflow file?
It’s currently not possible to reference another workflow like you can with actions. What you can do, however, is create a repository_dispatch event to trigger another workflow. You can do this with a curl command to call the GitHub API, but I’ve also written an action to simplify it a bit. See the README for an example of how to use it.