From da8b0f06c82d271616597cb099d25788130fac3f Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Tue, 6 Aug 2019 14:54:41 -0700 Subject: [PATCH] support semver in manifest [ci skip] --- docker/manifest.tmpl | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/docker/manifest.tmpl b/docker/manifest.tmpl index f358135..04a45a9 100644 --- a/docker/manifest.tmpl +++ b/docker/manifest.tmpl @@ -1,42 +1,48 @@ -image: drone/git:latest +image: drone/git:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} manifests: - - image: drone/git:linux-amd64 + image: drone/git:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 platform: architecture: amd64 os: linux - - image: drone/git:linux-arm64 + image: drone/git:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 platform: variant: v8 architecture: arm64 os: linux - - image: drone/git:linux-arm + image: drone/git:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm platform: variant: v7 architecture: arm os: linux - - image: drone/git:linux-arm + image: drone/git:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm platform: variant: v6 architecture: arm os: linux - - image: drone/git:windows-1803-amd64 + image: drone/git:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64 platform: architecture: amd64 os: windows version: 1803 - - image: drone/git:windows-1809-amd64 + image: drone/git:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64 platform: architecture: amd64 os: windows version: 1809 - - image: drone/git:windows-1903-amd64 + image: drone/git:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903-amd64 platform: architecture: amd64 os: windows