ci: fix mismatched docker tags being used
This commit is contained in:
parent
12f788661c
commit
3b12de23ff
|
@ -1,6 +1,12 @@
|
||||||
trigger:
|
trigger:
|
||||||
- master
|
- 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:
|
stages:
|
||||||
- stage: generate
|
- stage: generate
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -87,4 +93,4 @@ stages:
|
||||||
command: 'buildAndPush'
|
command: 'buildAndPush'
|
||||||
Dockerfile: 'proxy/Dockerfile'
|
Dockerfile: 'proxy/Dockerfile'
|
||||||
buildContext: 'proxy/'
|
buildContext: 'proxy/'
|
||||||
tags: 'gh-$(Build.SourceBranchName)'
|
tags: "gh-${{ variables.branchName }}"
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
trigger:
|
trigger:
|
||||||
- master
|
- 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:
|
stages:
|
||||||
- stage: lint
|
- stage: lint
|
||||||
jobs:
|
jobs:
|
||||||
|
|
Reference in New Issue