From e355fcdac0d95ba51db8997d8f592af8388fc55b Mon Sep 17 00:00:00 2001 From: Anthony Lavado Date: Mon, 27 Jul 2020 18:58:47 -0700 Subject: [PATCH] Merge pull request #1667 from joshuaboniface/fix-ci-docker Get and tag with actual release version in CI (cherry picked from commit 2c53a329e7661ee75ccd0e92a7f88578d10a7286) Signed-off-by: Joshua M. Boniface --- .ci/azure-pipelines-package.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.ci/azure-pipelines-package.yml b/.ci/azure-pipelines-package.yml index bf4234ec97..487ef863fe 100644 --- a/.ci/azure-pipelines-package.yml +++ b/.ci/azure-pipelines-package.yml @@ -59,7 +59,15 @@ jobs: pool: vmImage: 'ubuntu-latest' + variables: + - name: JellyfinVersion + value: 0.0.0 + 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 displayName: 'Push Unstable Image' condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/master') @@ -84,7 +92,7 @@ jobs: containerRegistry: Docker Hub tags: | stable-$(Build.BuildNumber) - stable + $(JellyfinVersion) - job: CollectArtifacts displayName: 'Collect Artifacts'