mirror of
https://github.com/docker/metadata-action.git
synced 2025-06-23 19:27:58 +02:00
global expressions support for labels and annotations
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
10
README.md
10
README.md
@ -818,7 +818,8 @@ Each tags `type` attribute has a default priority:
|
||||
### Global expressions
|
||||
|
||||
The following [Handlebars' template](https://handlebarsjs.com/guide/) expressions
|
||||
for `prefix`, `suffix`, `value` and `enable` attributes are available:
|
||||
for `prefix`, `suffix`, `value` and `enable` attributes of `tags` input are
|
||||
available:
|
||||
|
||||
```yaml
|
||||
tags: |
|
||||
@ -828,6 +829,13 @@ tags: |
|
||||
type=raw,value=mytag-{{branch}}-{{sha}}
|
||||
```
|
||||
|
||||
They can also be applied to `labels` and `annotations` inputs:
|
||||
|
||||
```yaml
|
||||
labels: |
|
||||
org.opencontainers.image.created={{commit_date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]'}}
|
||||
```
|
||||
|
||||
#### `{{branch}}`
|
||||
|
||||
Returns the branch name that triggered the workflow run. Will be empty if not
|
||||
|
Reference in New Issue
Block a user