From bbd2f682dcea4d31e60e9d11c98cd05331ba2d80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emek=20Vysok=C3=BD?= Date: Tue, 20 Dec 2022 16:01:14 +0100 Subject: [PATCH] Fix branch filters for the VMR synchronization (#15160) --- eng/pipelines/templates/jobs/vmr-synchronization.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/templates/jobs/vmr-synchronization.yml b/eng/pipelines/templates/jobs/vmr-synchronization.yml index 832265db5..039bf913c 100644 --- a/eng/pipelines/templates/jobs/vmr-synchronization.yml +++ b/eng/pipelines/templates/jobs/vmr-synchronization.yml @@ -53,7 +53,7 @@ jobs: # For official builds, push the changes to the VMR # Push only main and release branches - - ${{ if and(not(parameters.noPush), or(eq(parameters.vmrBranch, 'main'), startsWith(parameters.vmrBranch, 'release/')), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: + - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: - script: | set -x git config --global user.email 'dotnet-maestro[bot]@users.noreply.github.com' && git config --global user.name 'dotnet-maestro[bot]' @@ -64,3 +64,4 @@ jobs: git push dotnet ${{ parameters.vmrBranch }} displayName: Push changes to dotnet/dotnet workingDirectory: $(vmrPath) + condition: and(succeeded(), or(eq('${{ parameters.vmrBranch }}', 'main'), startsWith('${{ parameters.vmrBranch }}', 'release/')))