mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Set COMPOSER_NO_INTERACTION=1
Use composer.env file for configuring composer Add a note about composer configuration to the README
This commit is contained in:
parent
da0e854737
commit
d78b8a6d49
@ -300,6 +300,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
|
||||
- Input `tools` is useful to set up tools which you only use in GitHub Actions, thus keeping your `composer.json` tidy.
|
||||
- If you do not want to use all your dev-dependencies in GitHub Actions workflow, you can run composer with `--no-dev` and install required tools using `tools` input to speed up your workflow.
|
||||
- If you have a tool in your `composer.json`, do not set up it with `tools` input as the two instances of the tool might conflict.
|
||||
- By default, `COMPOSER_NO_INTERACTION` is set to `1` and `COMPOSER_PROCESS_TIMEOUT` is set to `0`.
|
||||
|
||||
## :signal_strength: Coverage Support
|
||||
|
||||
|
2
src/configs/composer.env
Normal file
2
src/configs/composer.env
Normal file
@ -0,0 +1,2 @@
|
||||
COMPOSER_PROCESS_TIMEOUT=0
|
||||
COMPOSER_NO_INTERACTION=1
|
@ -291,7 +291,7 @@ configure_composer() {
|
||||
echo '{}' | tee "$composer_json" >/dev/null
|
||||
chmod 644 "$composer_json"
|
||||
fi
|
||||
composer -q config -g process-timeout 0
|
||||
cat "${dist:?}"/../src/configs/composer.env >> "$GITHUB_ENV"
|
||||
echo "$composer_bin" >>"$GITHUB_PATH"
|
||||
if [ -n "$COMPOSER_TOKEN" ]; then
|
||||
composer -q config -g github-oauth.github.com "$COMPOSER_TOKEN"
|
||||
|
@ -327,7 +327,7 @@ Function Edit-ComposerConfig() {
|
||||
if (-not(Test-Path $composer_json)) {
|
||||
Set-Content -Path $composer_json -Value "{}"
|
||||
}
|
||||
composer -q config -g process-timeout 0
|
||||
Get-Content -Path $dist\..\src\configs\composer.env | Add-Content -Path $env:GITHUB_ENV
|
||||
Write-Output $composer_bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
|
||||
if (Test-Path env:COMPOSER_TOKEN) {
|
||||
composer -q config -g github-oauth.github.com $env:COMPOSER_TOKEN
|
||||
|
Loading…
Reference in New Issue
Block a user