Wrap unless-check in docker manifests (#23079) (#23081)

Backport #23079

Should fix the following:
> failed to render template: Evaluation error: Helper 'unless' called
with wrong number of arguments, needed 2 but got 3

https://go.dev/play/p/h7bt7MWKTcv

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
pull/23083/head
Yarden Shoham 2 years ago committed by GitHub
parent e67d60d336
commit 75eaf99076
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docker/manifest.rootless.tmpl
  2. 2
      docker/manifest.tmpl

@ -1,6 +1,6 @@
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}}-rootless 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}}-rootless
{{#if build.tags}} {{#if build.tags}}
{{#unless contains "-rc" build.tag}} {{#unless (contains "-rc" build.tag)}}
tags: tags:
{{#each build.tags}} {{#each build.tags}}
- {{this}}-rootless - {{this}}-rootless

@ -1,6 +1,6 @@
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}} 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}} {{#if build.tags}}
{{#unless contains "-rc" build.tag }} {{#unless (contains "-rc" build.tag)}}
tags: tags:
{{#each build.tags}} {{#each build.tags}}
- {{this}} - {{this}}

Loading…
Cancel
Save