-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
composer.json based on environment #258
Comments
I believe the COMPOSER environment variable lets you do this, as documented here. However, the filename composer.json seems to be hardcoded here in this action. A workaround might be to add zero-byte composer.json and composer.lock files to your repo to satisfy this script's looking for them... not sure though. |
Yes, I've read Composer's doc and seen the hardcoded |
@badasukerubin This GitHub action tests for the existence of composer.json and composer.lock. It doesn't actually use these filenames when invoking composer (composer uses the environment variable COMPOSER), but not having these files in existence causes the action to have problems. I have not tested this (I'm not the script author, just an interested person). But it looks like so long as these files exist, this action will be happy. So if you just make placeholder files with these names, this action may work for now. It still seems like a bug, but this may work around the problem. |
I'd accept a PR that allows you to customize the name of the Composer file. |
I'm working on a PR |
How do I... ?
Use a different
composer.json
, e.g.composer.gh-actions.json
(in the root directory) instead of defining aworking-directory
to another directory.Example code
E.g.
uses: ramsey/composer-install@v3
with:
working-composer: 'composer.gh-actions.json'
The text was updated successfully, but these errors were encountered: