mirror of
https://gitea.com/docker/metadata-action.git
synced 2024-11-22 03:59:33 +01:00
docs: add example for latest tag with dynamic condition
As described in https://github.com/docker/metadata-action/issues/147 Signed-off-by: Stig Otnes Kolstad <stig@stigok.com>
This commit is contained in:
parent
e5622373a3
commit
5949fa2b94
1 changed files with 8 additions and 0 deletions
|
@ -605,6 +605,14 @@ tags: |
|
|||
* [`type=semver,pattern=...`](#typesemver)
|
||||
* [`type=match,pattern=...`](#typematch)
|
||||
|
||||
For conditionally tagging with latest for a specific branch name, e.g. if your default branch name
|
||||
is not `master`, use `type=raw` with a boolean expression:
|
||||
|
||||
```yaml
|
||||
tags: |
|
||||
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
|
||||
```
|
||||
|
||||
### Global expressions
|
||||
|
||||
The following [Handlebars template](https://handlebarsjs.com/guide/) expressions for `prefix`, `suffix` and `value`
|
||||
|
|
Loading…
Reference in a new issue