trigger: tags: include: - 'v*' resources: - repo: self variables: tag: '$(Build.BuildId)' stages: - stage: Build displayName: Build jobs: - job: Build pool: vmImage: 'ubuntu-latest' steps: - script: | bash ./build.sh --release - task: Docker@2 condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/') displayName: Login to Docker Hub inputs: containerRegistry: dockerHub command: login - task: Docker@2 condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/') displayName: Push to Docker Hub inputs: containerRegistry: dockerHub command: push repository: cenotelie/cratery tags: 'latest,$(Build.SourceBranchName)'