mirror of
https://github.com/actions/versions-package-tools.git
synced 2025-12-10 03:13:23 +00:00
Merge pull request #36 from Yuriy-Kukushkin/main
Update manifest-validator.ps1 for GH Actions workflow
This commit is contained in:
@@ -3,6 +3,7 @@ param (
|
|||||||
[string] $AccessToken
|
[string] $AccessToken
|
||||||
)
|
)
|
||||||
|
|
||||||
|
$Global:validationFailed = $false
|
||||||
$authorizationHeaderValue = "Basic $AccessToken"
|
$authorizationHeaderValue = "Basic $AccessToken"
|
||||||
$webRequestHeaders = @{}
|
$webRequestHeaders = @{}
|
||||||
if ($AccessToken) {
|
if ($AccessToken) {
|
||||||
@@ -14,9 +15,13 @@ function Publish-Error {
|
|||||||
[string] $ErrorDescription,
|
[string] $ErrorDescription,
|
||||||
[object] $Exception
|
[object] $Exception
|
||||||
)
|
)
|
||||||
Write-Host "##vso[task.logissue type=error]ERROR: $ErrorDescription."
|
|
||||||
Write-Host "##vso[task.logissue type=error] $Exception"
|
echo "::error ::$ErrorDescription"
|
||||||
Write-Host "##vso[task.complete result=Failed;]"
|
if (-not [string]::IsNullOrEmpty($Exception))
|
||||||
|
{
|
||||||
|
Write-Output "Exception: $Exception"
|
||||||
|
}
|
||||||
|
$Global:validationFailed = $true
|
||||||
}
|
}
|
||||||
|
|
||||||
function Test-DownloadUrl {
|
function Test-DownloadUrl {
|
||||||
@@ -61,3 +66,7 @@ $manifestJson | ForEach-Object {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($Global:validationFailed) {
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user