diff --git a/azure-pipelines-rc.yml b/azure-pipelines-rc.yml index 1db1717e..71b0e08e 100644 --- a/azure-pipelines-rc.yml +++ b/azure-pipelines-rc.yml @@ -14,6 +14,23 @@ steps: displayName: 'Output tag' env: TAG: $(TAG) +- ${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}: + - task: PowerShell@2 + inputs: + targetType: 'inline' + script: | + $uri = "https://dev.azure.com/thecodemanual/DevOps Manual/_apis/build/builds/$(Build.BuildId)/timeline?api-version=5.1" + + Write-Host $uri + + # Invoke the REST call + $build = Invoke-RestMethod -Uri $uri -Method Get -Headers @{Authorization = "Bearer $(System.AccessToken)"} -ContentType "application/json" + + $taskResult = $build.records | Where-Object {$_.name -eq "ConditionalStep" } | Select-Object result + + Write-Host $taskResult.result + + pwsh: true - script: yarn install --ignore-engines && npx playwright install && yarn global add ts-node displayName: 'Install dependencies' - script: ts-node scripts/downloadGithubReleasePackage.ts