Skip to content

Commit

Permalink
ci: cancel job if not triggered on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUnderScorer committed Nov 27, 2023
1 parent 34bdda6 commit c1c82ea
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions azure-pipelines-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c1c82ea

Please sign in to comment.