Description
The install action does not appear to honor the working-directory configured in a workflow.
In this repro project I set up, I have a .tool-versions
file in the root that configures one version of a tool:
https://github.com/mdobosz-isp/asdf-actions-wrong-dir/blob/d448ef42593a21fef79927bd5e433f2f523b3888/.tool-versions#L1
I also have a subdirectory that sets a different version of the tool:
https://github.com/mdobosz-isp/asdf-actions-wrong-dir/blob/d448ef42593a21fef79927bd5e433f2f523b3888/helm3/.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#L22-L34
the action still appears to run in the root working directory, resulting in the wrong version being installed and invocations of the tool failing when the asdf shim tries to load the correct version.
This fails for workflows using the v1.0.0
and master
versions of the action.
I would expect that the asdf install
command was executed in the appropriate working directory.
The current workaround is to use the plugins-add
action (which will also run setup
) and run asdf install
as a freeform step.