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 authored Oct 14, 2021
1 parent d324c0f commit 7bc1654
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 7bc1654

Please sign in to comment.