Feature request: allow workflow configuration in sub-folders #18055
Replies: 43 comments 64 replies
-
I was searching for a way to organise many workflows in the UI, like by category or by team for a mono-repo. And I was thinking about just being able to create subfolders in the ./github/workflow/ folder, and that each folder would appear as a collapsable section in the UI. But this proposal would be even better, at least when it comes to separation of files, but I'm not sure how it would be presented in the UI? |
Beta Was this translation helpful? Give feedback.
-
I was trying to do:
With the hope that I would see a list of actions as
or something similar. Since the action names are configured in the yml files it would make sense to namespace actions according to the directory they are in. For my use case, aside from namespacing actions via a directory name, nothing would change (though since I use only a small subset of actions functionality I'm not sure if there are other considerations). It would be nice if it was possible to put In any case, thank you for the actions tooling! It's pretty amazing. |
Beta Was this translation helpful? Give feedback.
-
It would also be rather nice if there could be a way to run a workflow nested in a submodule, and then leverage that same submoduled workflow to work on the parent repository. This is definitely a much bigger ask than what the original discussion was most likely tailored for, but it would certainly come in use for a repository I currently maintain. |
Beta Was this translation helpful? Give feedback.
-
This will help a lot my team for a mono-repo! I hope to saw this feature soon |
Beta Was this translation helpful? Give feedback.
-
You can do a lot of this by using a It isn't perfect, but, you can do it. Or, you could just use Forcing GitHub to recurse through the entire tree, or even a large slice of a tree whenever it receives any event is almost certainly a non-starter. I appreciate the problem, but don't think that asking them to do this is likely to go anywhere. What you can do is have your workflow load its configuration from a file at a path in your chosen directory. Many public workflows do this, although typically that directory is |
Beta Was this translation helpful? Give feedback.
-
A good workaround is symbolic links in your root directory |
Beta Was this translation helpful? Give feedback.
-
This feature would be awesome to have for when using both re-usable workflows and the "regular" workflow. Right now, I'm naming things with emojis in front of them to do this. 😂 It gets a little ⚡ if it's a re-usable. |
Beta Was this translation helpful? Give feedback.
-
Apparently it doesn’t work
…On Tue, Aug 2, 2022 at 6:32 AM Tim Kretschmer ***@***.***> wrote:
How can i achieve this?
ln -s ?
—
Reply to this email directly, view it on GitHub
<#18055 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOE4LLF6VBUR4F74GVLKSLVXD2KHANCNFSM5YELZWBA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Instead of recursing through the whole repo, why not provide a keyword in the root .github/workflows that can be used to point to the "sub-root" of the directory you want to treat as it's own repo (for actions)? Something like this: In
In
Benefits:
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
This would be a nice feature for our template projects, to make certain workflows optional and easy to tear out (with related scripts). eg. "Not using the event queue system? tear out the workflow and related integration testing scripts by pulling ONE folder..." Suggested workaround: strictly enforced naming conventions on the workflow files. e.g. " |
Beta Was this translation helpful? Give feedback.
-
also running a monorepo and having workflow subfolders would be great as we have a lot of granular separation going on. this would be ideal for us:
|
Beta Was this translation helpful? Give feedback.
-
I've been following this thread for a while, if you're interest I made a simple cli in rust that can help with workflows context separation. Is still a WIP, nothing fancy. Hope this helps someone ✌️ |
Beta Was this translation helpful? Give feedback.
-
Has there been any progress made on this? Being able to define a |
Beta Was this translation helpful? Give feedback.
-
We are using monorepo setup and our |
Beta Was this translation helpful? Give feedback.
-
Yeah would love to see this feature added |
Beta Was this translation helpful? Give feedback.
-
PLEASE.. this feels like such an obvious miss or the GHA team was strongly under the assumption any given repo would have <5 workflows. ~20 some odd services in one repo that comes to mind, with four environments across five teams.. surprisingly is very fluid, except for the GHA organization. |
Beta Was this translation helpful? Give feedback.
-
Still not working. |
Beta Was this translation helpful? Give feedback.
-
Adjacent topic, but folders for Secrets would also be appreciated... |
Beta Was this translation helpful? Give feedback.
-
create generic workflows that are heavily parameterized so as to compensate for having multiple workflows for each variation. This will reduce the clutter. |
Beta Was this translation helpful? Give feedback.
-
Need this feature. It would help us to organize or distinguish the workflows & templates better. Hope to get the resolution for the error soon - invalid value workflow reference: references to workflows must be rooted in .github/workflows |
Beta Was this translation helpful? Give feedback.
-
Aboslutely needed , migrating from GitLab to GitHub is leaving our mono repos with reusable code without any folder structure and a complete mess |
Beta Was this translation helpful? Give feedback.
-
Working on converting to a mono-repository for a large game and indeed, without this it is really disadvantageous to not be able to scan subfolders for a .github/ yaml file. Why is this important for a single repo:
You want to run a build but only if a specific folder is changed. Why we use a mono repo:
When I modify BIG_PROJECT_A/ I would like to run CICD scripts contextually for that specific folder, like version bump, a web app is an example of where this is important when it must speak to other systems. Currently what I will have to hack together:
What would be ideal:
|
Beta Was this translation helpful? Give feedback.
-
+1, in large monorepos a better way of organizing workflows is really necessary |
Beta Was this translation helpful? Give feedback.
-
+1 for this feature! It would be very helpful for better organizing monorepo workflows. |
Beta Was this translation helpful? Give feedback.
-
+1 for this feature! It would be very helpful for better organizing monorepo workflows x2 |
Beta Was this translation helpful? Give feedback.
-
+1 Keep things organized! |
Beta Was this translation helpful? Give feedback.
-
+1 For organization |
Beta Was this translation helpful? Give feedback.
-
+1 For organization |
Beta Was this translation helpful? Give feedback.
-
+1 for sub folders, we also use a monorepo so we have 20+ workflows |
Beta Was this translation helpful? Give feedback.
-
Copying this feature request over from https://github.community/t/feature-request-allow-workflow-configuration-in-sub-folders/16776
Beta Was this translation helpful? Give feedback.
All reactions