From 7bc16549684458fa9c6ab9611dee943ad21f82d1 Mon Sep 17 00:00:00 2001 From: Ben Broderick Phillips Date: Thu, 14 Oct 2021 18:41:26 -0400 Subject: [PATCH] Add succeeded() condition to docker push PullRequest condition Co-authored-by: Wes Haggard --- eng/containers/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eng/containers/ci.yml b/eng/containers/ci.yml index aa5ef61480c1..5b699191c7c6 100644 --- a/eng/containers/ci.yml +++ b/eng/containers/ci.yml @@ -80,7 +80,7 @@ jobs: - task: Docker@2 displayName: Push ${{ config.name }}:$(imageTag) - condition: ne(variables['Build.Reason'], 'PullRequest') + condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) inputs: containerRegistry: $(containerRegistry) repository: ${{ config.dockerRepo }} @@ -98,7 +98,8 @@ jobs: - task: Docker@2 displayName: Push ${{ config.name }}:${{ stableTag }} - condition: ne(variables['Build.Reason'], 'PullRequest') + condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) + inputs: containerRegistry: $(containerRegistry) repository: ${{ config.dockerRepo }}