-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow running the reusable workflow from the same branch #932
Comments
This is now available! Taken from source:
|
Thanks for the heads up! GitHub is really unresponsive in this repo :( closing this now in hopes that less open issues will yield more responses. 🤞 |
Unfortunately, it's not possible to use a different branch in the same repo:
Trying to "cheat" and refer to the current repo as if it were a different one results in a super cryptic error:
Funnily enough, adding a repo indirection that |
Just to rule it out (based on your code block examples): did you refer to |
It's only when all the values are correct that I get the cryptic error message. If I make a typo in anything, then I get a useful error message like for instance What really baffles me is this in your description:
So when implementing local references, GitHub (accidentally?) broke explicit self-references? Are you positive this used to work? |
OK, now I'm getting the same cryptic error even after moving the called workflows to a different repository. Maybe it's just an error propagation issue when nesting workflows. |
My bad, it is possible to do this. I had Thanks for questioning me, that really helped. Note the following is still not possible; no confusion about that. That error stands:
So if you want to store your called workflows in a different branch of the same repo, then you must hardcode your entire, own repo name in the calling file. It definitely lacks flexibility and it's not clear why but I'll live with that. |
@marc-hb Glad you figured it out.
I actually don't remember if it worked as my goal was to use it from "current" and not a specific one. I just copied what was available at the time. I updated OP with an archive link, so you can see my context. |
Note: this repo is my best guess for the issue, as it seems
workflow_call
is not implemented in this org?! Please move it if it's not appropriate.Describe the enhancement
Allow using the same branch for
workflow_call
.Fully-qualified / cross-repo reusability is awesome, but the base case of reusing locally is missing. To develop/change a
workflow_call
I need to update all the usages to test it, imagine the same in programming and method calls 😒.At the minimum please add this to https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#limitations
Code snippet
Right now we have to use a specific ref (archive):
For development and stability, it would be best to allow non-qualified usage, for example:
at this point the workflow from the same branch would be used.
SO user makes a good argument here: https://stackoverflow.com/a/69676592/253468
This would only work if it's the same repo, so maybe it could be even simpler as
or just
Additional information
https://stackoverflow.com/q/69532525/253468
https://stackoverflow.com/q/69500491/253468
The text was updated successfully, but these errors were encountered: