Skip to content

Commit

Permalink
Update docker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
WeihanLi authored Apr 2, 2023
1 parent 08e5cdc commit b13fa05
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .azure/pipelines/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ trigger:
branches:
include:
- 'main'
- 'dev'
- 'preview'

pool:
vmImage: 'ubuntu-latest'
Expand Down Expand Up @@ -34,14 +34,12 @@ steps:

- script: |
docker login -u $(dockerId) -p $(pswd)
docker push weihanli/dotnet-httpie:latest
displayName: 'Push docker image'

- script: |
docker push weihanli/dotnet-httpie:preview
displayName: 'Push latest image'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/dev'))
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/preview'))

- script: docker push weihanli/dotnet-httpie:stable
- script: |
docker login -u $(dockerId) -p $(pswd)
docker push weihanli/dotnet-httpie:stable
displayName: 'Push stable image'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))

0 comments on commit b13fa05

Please sign in to comment.