Sync eng/common directory with azure-sdk-tools for PR 8650 (#5812)

* missed a condition passthrough

---------

Co-authored-by: Scott Beddall <scbedd@microsoft.com>
Co-authored-by: Scott Beddall <45376673+scbedd@users.noreply.github.com>
This commit is contained in:
Azure SDK Bot 2024-07-19 13:44:47 -07:00 committed by GitHub
parent ab777719ea
commit 522b25508d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,7 @@ parameters:
WorkingDirectory: '$(System.DefaultWorkingDirectory)'
RemoteRepo: 'origin'
DefaultBranchVariableName: DefaultBranch
Condition: 'succeeded()'
steps:
- pwsh: |
$setDefaultBranch = (git remote show ${{ parameters.RemoteRepo }} | Out-String) -replace "(?ms).*HEAD branch: (\w+).*", '$1'
@ -13,4 +14,5 @@ steps:
Write-Host "##vso[task.setvariable variable=${{ parameters.DefaultBranchVariableName }}]$setDefaultBranch"
displayName: "Setup Default Branch"
workingDirectory: ${{ parameters.workingDirectory }}
condition: ${{ parameters.Condition }}
ignoreLASTEXITCODE: true

View File

@ -12,6 +12,8 @@ parameters:
steps:
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
parameters:
Condition: ${{ parameters.Condition }}
- task: PowerShell@2
displayName: Link verification check
condition: ${{ parameters.Condition }}