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:
Shivam Mathur
2021-12-26 15:10:26 +05:30
parent da0e854737
commit d78b8a6d49
4 changed files with 5 additions and 2 deletions

View File

@ -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"

View File

@ -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