Skip to content

Commit

Permalink
Add succeeded() condition to docker push PullRequest condition
Browse files Browse the repository at this point in the history
Co-authored-by: Wes Haggard <[email protected]>
  • Loading branch information
benbp and weshaggard committed Oct 14, 2021
1 parent 1e0b00a commit 27e997f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eng/containers/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down

0 comments on commit 27e997f

Please sign in to comment.