docs: priority attribute

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2022-10-08 01:10:48 +02:00
parent 5ebec4fd21
commit 49e79e3532
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7

View file

@ -33,6 +33,7 @@ ___
* [Notes](#notes)
* [Image name and tag sanitization](#image-name-and-tag-sanitization)
* [Latest tag](#latest-tag)
* [`priority` attribute](#priority-attribute)
* [Global expressions](#global-expressions)
* [`{{branch}}`](#branch)
* [`{{tag}}`](#tag)
@ -361,7 +362,7 @@ Each entry is defined by a `type`, which are:
And global attributes:
* `enable=<true|false>` enable this entry (default `true`)
* `priority=<number>` priority to manage the order of tags
* `priority=<number>` set tag [priority](#priority-attribute) order
* `prefix=<string>` add prefix
* `suffix=<string>` add suffix
@ -670,6 +671,24 @@ tags: |
type=raw,value=latest,enable={{is_default_branch}}
```
### `priority` attribute
`priority=<int>` attribute is used to sort tags in the final list. The higher
the value, the higher the priority. The first tag in the list (higher priority)
will be used as the image version for generated OCI label and [`version` output](#outputs).
Each tags `type` attribute has a default priority:
| Attribute | Default priority |
|------------|------------------|
| `schedule` | `1000` |
| `semver` | `900` |
| `pep440` | `900` |
| `match` | `800` |
| `edge` | `700` |
| `ref` | `600` |
| `raw` | `200` |
| `sha` | `100` |
### Global expressions
The following [Handlebars' template](https://handlebarsjs.com/guide/) expressions