Obtenez le nom de la branche du pipeline Azure
$branchSource = "$(Build.SourceBranch)" #this is "refs/heads/YourBranch"
$branchSourcePath = $branchSource -replace "refs/heads/", "" #this is "YourBranch"
Clément Bazin