ci: Support nested config_path
inputs
#2975
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
The current
config_path
input
option is a bit of a misnomer - it's better described asconfig_dir_name
as providing a path that is more than a single level deep will result in the following error when reaching thewest update
stage:This occurs because
west init -l <dir>
creates a.west
folder in the parent directory of<dir>
marking it as the westtopdir
.In subsequent
west
commands,west
will search up the directory tree (I think) for this.west
folder.If it doesn't find one, it'll throw the above error.
For level
config_path
inputs this is fine, as the parent directory is the same as the base directory the workflow is executing it. However, if we provide a multilevel path e.g.crkbd/config
the command will fail as thewest
workspace and the base directory are no longer equivalent.This PR fixes this by propagating the
west
workspace directory correctly to subsequent commands.Example workflow.
Why
I use a nested monorepo for my keyboard configurations and want the option to use the workflow for multiple different configurations without:
This is kind of a 'power user' feature so to speak so I haven't written any docs for it.
I couldn't find any docs for non-standard workflow set-ups anyway.