composer-install
composer-install copied to clipboard
Use of `defaults.run.working-directory`
First things first, thanks a lot for this GitHub Actions workflow ! 👍
I see that there is the composer-options
that allow to specify the working directory with --working-dir=foo
if the composer.json
file is in the foo
sub-directory.
I'm using the defaults.run.working-directory
in my workflow:
defaults:
run:
working-directory: foo/
Is there a way to make ramsey/composer-install
use that defaults.run.working-directory
if it is specified ?
Thanks!
Hi, see https://github.com/ramsey/composer-install#alternate-composerjson-locations.
Using --workding-dir
in your composer-options
will automatically change the working directory (see related PR #107)
Yes, that works indeed perfectly fine.
My question was about not having to specify --workding-dir
in my composer-options
if defaults.run.working-directory
is specified.
Am I missing something ?
This is fixed in v2, please upgrade using ramsey/composer-install@v2
or ramsey/[email protected]
. Details are available on the release announcement and the README.
Thanks!
Thanks a lot @ramsey ! 👍
Will it work with defaults.run.working-directory
(default configuration) or do I still need to specify working-directory
as input ?
Hmm. That's a good question. If defaults.run.working-directory
tells GitHub to run everything from that directory, it should work accordingly, as long as your composer.json
isn't in some place other than defaults.run.working-directory
. Let me know if it doesn't work.
Hmm. That's a good question. If
defaults.run.working-directory
tells GitHub to run everything from that directory, it should work accordingly, as long as yourcomposer.json
isn't in some place other thandefaults.run.working-directory
. Let me know if it doesn't work.
I just tried and it doesn't work if I just specify defaults.run.working-directory
Error: Unable to find composer.json at './composer.json'
I tried stuff like the following but it doesn't seem to be "supported" by GitHub Actions.
- uses: ramsey/composer-install@v2
with:
working-directory: ${{ defaults.run.working-directory }}
But using working-directory
with the correct path in ramsey/composer-install@v2
works as expected! 👍
Thanks for reporting back your findings. I'll need to look into this. It does make sense that it should respect the current working directory of the job.