Merge pull request #3723 from joshuaboniface/fix-ci-docker
Get and tag with the actual release version in CI
This commit is contained in:
commit
b207907e1b
|
@ -80,7 +80,15 @@ jobs:
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-latest'
|
vmImage: 'ubuntu-latest'
|
||||||
|
|
||||||
|
variables:
|
||||||
|
- name: JellyfinVersion
|
||||||
|
value: 0.0.0
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- script: echo '##vso[task.setvariable variable=JellyfinVersion]$( awk -F "/" "{ print $NF }" <<<"$(Build.SourceBranch)" | sed "s/^v//" )'
|
||||||
|
displayName: Set release version (stable)
|
||||||
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
||||||
|
|
||||||
- task: Docker@2
|
- task: Docker@2
|
||||||
displayName: 'Push Unstable Image'
|
displayName: 'Push Unstable Image'
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/master')
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/master')
|
||||||
|
@ -105,7 +113,7 @@ jobs:
|
||||||
containerRegistry: Docker Hub
|
containerRegistry: Docker Hub
|
||||||
tags: |
|
tags: |
|
||||||
stable-$(Build.BuildNumber)-$(BuildConfiguration)
|
stable-$(Build.BuildNumber)-$(BuildConfiguration)
|
||||||
stable-$(BuildConfiguration)
|
$(JellyfinVersion)-$(BuildConfiguration)
|
||||||
|
|
||||||
- job: CollectArtifacts
|
- job: CollectArtifacts
|
||||||
displayName: 'Collect Artifacts'
|
displayName: 'Collect Artifacts'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user