plugins-add action does not walk up directory structure to discover all possible plugins
The plugins-add action does not appear to walk up the directory structure to discover all possible plugins to install when a non-default working-directory is configured in a workflow.
In this repro project I set up, I have a .tool-versions file in the root that configures one tool:
https://github.com/mdobosz-isp/asdf-actions-wrong-dir/blob/d448ef42593a21fef79927bd5e433f2f523b3888/.tool-versions#L1
I also have a subdirectory that sets a different tool:
https://github.com/mdobosz-isp/asdf-actions-wrong-dir/blob/d448ef42593a21fef79927bd5e433f2f523b3888/terraform/.tool-versions#L1
When I execute a workflow that uses the non-default working directory:
https://github.com/mdobosz-isp/asdf-actions-wrong-dir/blob/26d01bec1e7a7b48c5270acce978db41a4e2a3a4/.github/workflows/repro.yml#L8-L20
the plugin configured only in the subdirectory does not get installed which makes it impossible to correctly use the install action in that subdirectory (assuming https://github.com/asdf-vm/actions/issues/83 gets resolved) or to run asdf install as a freeform step.
This fails for workflows using the v1.0.0 and master versions of the action.
I would expect that the plugins-add action walked up the directory tree starting from working-directory and assembled the set of plugins to install from all .tool-versions files found.
The current workarounds are:
- Specify all possible tools and their default versions in the repos root
.tool-versionsfile - Run the
plugins-addaction multiple times for each directory that has a.tool-versionsfile, however this does not work on thev1version of the action because https://github.com/asdf-vm/actions/pull/74 has not become part of an official release yet.
Implementing this makes a lot of sense if you want to use asdf in the CI workflow. I will try this, but I think it's a bit too much to recursively check all directories by default, so it would be better to disable it feature by default. What do you think?