ci: fix mismatched docker tags being used

This commit is contained in:
Jens Langhammer 2020-12-02 22:41:53 +01:00
parent 12f788661c
commit 3b12de23ff
2 changed files with 13 additions and 1 deletions

View File

@ -1,6 +1,12 @@
trigger:
- master
variables:
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}:
branchName: ${{ replace(variables['Build.SourceBranchName'], 'refs/heads/', '') }}
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
branchName: ${{ replace(variables['System.PullRequest.SourceBranch'], 'refs/heads/', '') }}
stages:
- stage: generate
jobs:
@ -87,4 +93,4 @@ stages:
command: 'buildAndPush'
Dockerfile: 'proxy/Dockerfile'
buildContext: 'proxy/'
tags: 'gh-$(Build.SourceBranchName)'
tags: "gh-${{ variables.branchName }}"

View File

@ -1,6 +1,12 @@
trigger:
- master
variables:
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}:
branchName: ${{ replace(variables['Build.SourceBranchName'], 'refs/heads/', '') }}
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
branchName: ${{ replace(variables['System.PullRequest.SourceBranch'], 'refs/heads/', '') }}
stages:
- stage: lint
jobs: