Comments (6)
php-actions/composer
runs a Docker container so your environment variable does not reach that.
Try simply running Composer
- name: "Install dependencies with Composer"
env:
ACF_PRO_KEY: "${{ secrets.ACF_PRO_KEY }}"
run: "composer update --no-interaction --no-progress"
from private-composer-installer.
Thanks for the response @szepeviktor.
This is my first attempt at using GitHub Actions (coming from GitLab CI) so apologise if I'm incorrect, but my understanding of the documentation is that passing the env
config to step will set it within it? Additionally the author of php-actions/composer
suggest this is also correct.
For the time being I have found a solution by adding an additional step before php-actions/composer
which dumps my global ACF_PRO_KEY
in to an .env
file. This installs the package without issue.
- name: Create .env
run: |
echo "ACF_PRO_KEY=$ACF_PRO_KEY" > .env
- name: Install dependencies
uses: php-actions/composer@v5
with:
php_version: '7.4'
Would this not counter your argument of the environment variable not being accessible to the Docker container?
I'm not entirely comfortable with this as a solution, but at the moment it appears to be the only way to get ffraenz/private-composer-installer
and php-actions/composer
to play nicely with each other.
from private-composer-installer.
but my understanding of the documentation is that passing the
env
config to step will set it within it
There is no problem with that. php-actions/composer will receive the env but php-actions/composer itself starts up a container and does not pass local env to that container.
from private-composer-installer.
Would this not counter your argument of the environment variable not being accessible to the Docker container?
I simply never used php-actions/composer.
from private-composer-installer.
Thanks again @szepeviktor.
Skipping php-actions/composer
and manually running Composer is certainly an option worth considering and is something I can investigate at a later date. For now the deployment is working at least.
I'll take the issue back to php-actions/composer
and close this once I've heard back.
from private-composer-installer.
The author of php-actions/composer
has confirmed it is a bug their end, so I'm closing this.
from private-composer-installer.
Related Issues (20)
- Install issue with roots.io Bedrook HOT 3
- Incompatile with prestissimo plugin HOT 8
- Support plugins served by EDD HOT 7
- Support for Composer 2 HOT 3
- Support placeholder in other part than dist URL HOT 3
- Can you place the .env file in a directory above `composer.json`? HOT 3
- Type content/mu-plugin HOT 1
- Update dependency vlucas/phpdotenv to v5 HOT 2
- Allowed memory exhausted when installing v5 HOT 3
- Fatal error: Uncaught TypeError: Argument 2 passed to FFraenz\PrivateComposerInstaller\Plugin::fulfillVersionPlaceholder() HOT 2
- Fail installing ACF when running `composer update` after updating to Composer 2 HOT 6
- Empty ACF package folder in vendor/ HOT 8
- Class 'FFraenz\PrivateComposerInstaller\Environment\LoaderFactory' not found HOT 17
- "Could not find package" (Packagist conflict?) HOT 7
- WPML installation stopped working? HOT 9
- Version constraint for Composer 1 does not allow ACF 5.10.x to update HOT 3
- Support for Yith plugins HOT 6
- How to download Divi theme HOT 2
- Remove ACF Pro from examples now that they support native Composer integration? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from private-composer-installer.