Skip to content

Commit 49e79e3

Browse files
committed
docs: priority attribute
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
1 parent 5ebec4f commit 49e79e3

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ ___
3333
* [Notes](#notes)
3434
* [Image name and tag sanitization](#image-name-and-tag-sanitization)
3535
* [Latest tag](#latest-tag)
36+
* [`priority` attribute](#priority-attribute)
3637
* [Global expressions](#global-expressions)
3738
* [`{{branch}}`](#branch)
3839
* [`{{tag}}`](#tag)
@@ -361,7 +362,7 @@ Each entry is defined by a `type`, which are:
361362
And global attributes:
362363

363364
* `enable=<true|false>` enable this entry (default `true`)
364-
* `priority=<number>` priority to manage the order of tags
365+
* `priority=<number>` set tag [priority](#priority-attribute) order
365366
* `prefix=<string>` add prefix
366367
* `suffix=<string>` add suffix
367368

@@ -670,6 +671,24 @@ tags: |
670671
type=raw,value=latest,enable={{is_default_branch}}
671672
```
672673

674+
### `priority` attribute
675+
676+
`priority=<int>` attribute is used to sort tags in the final list. The higher
677+
the value, the higher the priority. The first tag in the list (higher priority)
678+
will be used as the image version for generated OCI label and [`version` output](#outputs).
679+
Each tags `type` attribute has a default priority:
680+
681+
| Attribute | Default priority |
682+
|------------|------------------|
683+
| `schedule` | `1000` |
684+
| `semver` | `900` |
685+
| `pep440` | `900` |
686+
| `match` | `800` |
687+
| `edge` | `700` |
688+
| `ref` | `600` |
689+
| `raw` | `200` |
690+
| `sha` | `100` |
691+
673692
### Global expressions
674693

675694
The following [Handlebars' template](https://handlebarsjs.com/guide/) expressions

0 commit comments

Comments
 (0)