summaryrefslogtreecommitdiffstats
path: root/docker/manifest.tmpl
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2022-02-03 21:44:51 +0000
committerGitHub <noreply@github.com>2022-02-03 22:44:51 +0100
commit9f9ca0aae46713823951d801c294db244a7ae1ca (patch)
tree6ead6f9a251f77b424998c5e3336e70750576d9d /docker/manifest.tmpl
parentcafd19c1a3245f3dc730b876a693914a7d8260a5 (diff)
downloadgitea-9f9ca0aae46713823951d801c294db244a7ae1ca.tar.gz
gitea-9f9ca0aae46713823951d801c294db244a7ae1ca.zip
Fix pushing to 1-x-dev docker tag (#18578)
* Fix pushing to 1-x-dev docker tag It appears that #18551 and #18573 have a mistake in that raymond does not have an {{else}} on {{#equal}}. This PR notes that Sprig has a hasPrefix function and so we use this with another if. Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix pushing to 1-x-dev docker tag (part 2) Although we now have the manifest working, we need to create the images. Here we adjust the .drone.yml to force building of the images Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix pushing to 1-x-dev docker tag OK now we have the images building we should make sure that the main ones stays dev and the release/v* ones become *-dev-* Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review
Diffstat (limited to 'docker/manifest.tmpl')
-rw-r--r--docker/manifest.tmpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/docker/manifest.tmpl b/docker/manifest.tmpl
index 2d125c96ca..4cd4ea4ea2 100644
--- a/docker/manifest.tmpl
+++ b/docker/manifest.tmpl
@@ -1,4 +1,4 @@
-image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}{{#equal build.ref "refs/heads/main"}}dev{{else}}{{trimPrefix "refs/heads/release/v" build.ref}}-dev{{/equal}}{{/if}}
+image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}{{#if (hasPrefix "refs/heads/release/v" build.ref)}}{{trimPrefix "refs/heads/release/v" build.ref}}-{{/if}}dev{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
@@ -8,12 +8,12 @@ tags:
{{/if}}
manifests:
-
- image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}{{#equal build.ref "refs/heads/main"}}dev{{else}}{{trimPrefix "refs/heads/release/v" build.ref}}-dev{{/equal}}{{/if}}-linux-amd64
+ image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}{{#if (hasPrefix "refs/heads/release/v" build.ref)}}{{trimPrefix "refs/heads/release/v" build.ref}}-{{/if}}dev{{/if}}-linux-amd64
platform:
architecture: amd64
os: linux
-
- image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}{{#equal build.ref "refs/heads/main"}}dev{{else}}{{trimPrefix "refs/heads/release/v" build.ref}}-dev{{/equal}}{{/if}}-linux-arm64
+ image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}{{#if (hasPrefix "refs/heads/release/v" build.ref)}}{{trimPrefix "refs/heads/release/v" build.ref}}-{{/if}}dev{{/if}}-linux-arm64
platform:
architecture: arm64
os: linux