Overwrite runs-on defined in workflow_call #26801
-
I’m creating a general workflow_call to create easy to use templates that is supposed to be used by both companies and open-source. To my knowledge I have to define
Reusing workflows - GitHub DocsIs there any way to overwrite runs-on so I instead can use |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I didn’t think about this yet, it seems you can use expression syntax in runs-on with your input. Example
Call the workflow with runs-on as input.
Single label
It isn’t great that inputs cannot be Objects (Arrays), but only string, boolean or number. You have to use json, unless github allows object inputs in the furture. I’m not shure where inputs are allowed and where it is forbidden, the documentation is outdated so I had to test it myself and it worked |
Beta Was this translation helpful? Give feedback.
-
Easier solution then I hoped for, I should have thought of it as well. |
Beta Was this translation helpful? Give feedback.
-
Thanks for jumping in with that speedy reply, @ChristopherHX! Glad to hear this helped, @NissesSenap :slight_smile: |
Beta Was this translation helpful? Give feedback.
I didn’t think about this yet, it seems you can use expression syntax in runs-on with your input.
Example
Call the workflow with runs-on as input.
Multiple labels
Single label