Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ccf2c627fe | ||
|
|
2a597f617d |
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-php",
|
"name": "setup-php",
|
||||||
"version": "2.35.1",
|
"version": "2.35.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "setup-php",
|
"name": "setup-php",
|
||||||
"version": "2.35.1",
|
"version": "2.35.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^1.11.1",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-php",
|
"name": "setup-php",
|
||||||
"version": "2.35.1",
|
"version": "2.35.2",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "Setup PHP for use with GitHub Actions",
|
"description": "Setup PHP for use with GitHub Actions",
|
||||||
"main": "lib/install.js",
|
"main": "lib/install.js",
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ Function Edit-ComposerConfig() {
|
|||||||
Set-ComposerAuth
|
Set-ComposerAuth
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to merge auth.json fragments.
|
# Function to update auth.json.
|
||||||
Function Get-MergedAuthJson {
|
Function Update-AuthJson {
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory)][string[]] $ComposerAuth
|
[Parameter(Mandatory)][string[]] $ComposerAuth
|
||||||
@@ -58,7 +58,7 @@ Function Get-MergedAuthJson {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $existing | ConvertTo-Json -Depth 5
|
Set-Content -Path $composer_home\auth.json -Value ($existing | ConvertTo-Json -Depth 5)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to setup authentication in composer.
|
# Function to setup authentication in composer.
|
||||||
@@ -81,7 +81,7 @@ Function Set-ComposerAuth() {
|
|||||||
$composer_auth += '"github-oauth": {"github.com": "' + $env:GITHUB_TOKEN + '"}'
|
$composer_auth += '"github-oauth": {"github.com": "' + $env:GITHUB_TOKEN + '"}'
|
||||||
}
|
}
|
||||||
if($composer_auth.length) {
|
if($composer_auth.length) {
|
||||||
Set-Content -Path $composer_home\auth.json -Value (Get-MergedAuthJson $composer_auth)
|
Update-AuthJson $composer_auth
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ configure_composer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Function to merge auth.json fragments.
|
# Function to merge auth.json fragments.
|
||||||
get_merged_auth_json() {
|
update_auth_json() {
|
||||||
local auth_file="$composer_home/auth.json"
|
local auth_file="$composer_home/auth.json"
|
||||||
local merged
|
local merged
|
||||||
[[ -f "$auth_file" ]] && merged=$(<"$auth_file") || merged='{}'
|
[[ -f "$auth_file" ]] && merged=$(<"$auth_file") || merged='{}'
|
||||||
@@ -62,7 +62,7 @@ get_merged_auth_json() {
|
|||||||
end
|
end
|
||||||
')
|
')
|
||||||
done
|
done
|
||||||
printf '%s' "$merged"
|
printf '%s' "$merged" > "$composer_home/auth.json"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to setup authentication in composer.
|
# Function to setup authentication in composer.
|
||||||
@@ -82,7 +82,7 @@ set_composer_auth() {
|
|||||||
composer_auth+=( '"github-oauth": {"github.com": "'"${GITHUB_TOKEN:-$COMPOSER_TOKEN}"'"}' )
|
composer_auth+=( '"github-oauth": {"github.com": "'"${GITHUB_TOKEN:-$COMPOSER_TOKEN}"'"}' )
|
||||||
fi
|
fi
|
||||||
if ((${#composer_auth[@]})); then
|
if ((${#composer_auth[@]})); then
|
||||||
get_merged_auth_json "${composer_auth[@]}" | tee "$composer_home/auth.json" >/dev/null
|
update_auth_json "${composer_auth[@]}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user