Skip to content

Commit

Permalink
Set COMPOSER_NO_INTERACTION=1
Browse files Browse the repository at this point in the history
Use composer.env file for configuring composer

Add a note about composer configuration to the README
  • Loading branch information
shivammathur committed Dec 26, 2021
1 parent 75988cd commit e7e1eee
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions src/configs/composer.env
@@ -0,0 +1,2 @@
COMPOSER_PROCESS_TIMEOUT=0
COMPOSER_NO_INTERACTION=1
2 changes: 1 addition & 1 deletion src/scripts/common.sh
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/win32.ps1
Expand Up @@ -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
Expand Down

0 comments on commit e7e1eee

Please sign in to comment.