mirror of
https://gitea.com/docker/metadata-action.git
synced 2024-11-22 03:59:33 +01:00
Major version zero doc (#74)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
e4fc7e9e11
commit
400bd87b5a
1 changed files with 20 additions and 0 deletions
20
README.md
20
README.md
|
@ -39,6 +39,7 @@ ___
|
|||
* [Notes](#notes)
|
||||
* [Latest tag](#latest-tag)
|
||||
* [Global expressions](#global-expressions)
|
||||
* [Major version zero](#major-version-zero)
|
||||
* [Overwrite labels](#overwrite-labels)
|
||||
* [Keep up-to-date with GitHub Dependabot](#keep-up-to-date-with-github-dependabot)
|
||||
* [Contributing](#contributing)
|
||||
|
@ -574,6 +575,25 @@ tags: |
|
|||
type=raw,value=mytag-{{branch}}-{{sha}}
|
||||
```
|
||||
|
||||
### Major version zero
|
||||
|
||||
Major version zero (`0.y.z`) is for initial development and **may** change at any time. This means the public API
|
||||
[**should not** be considered stable](https://semver.org/#spec-item-4).
|
||||
|
||||
In this case, Docker tag `0` **should not** be generated if you're using [`type=semver`](#typesemver) with `{{major}}`
|
||||
pattern. You can manage this behavior like this:
|
||||
|
||||
```yaml
|
||||
# refs/tags/v0.1.2
|
||||
tags: |
|
||||
# output 0.1.2
|
||||
type=semver,pattern={{version}}
|
||||
# output 0.1
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
# disabled if major zero
|
||||
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
|
||||
```
|
||||
|
||||
### Overwrite labels
|
||||
|
||||
If some of the [OCI Image Format Specification](https://github.com/opencontainers/image-spec/blob/master/annotations.md)
|
||||
|
|
Loading…
Reference in a new issue