Skip to content

Commit

Permalink
Merge pull request #160 from stigok/docs-dynamic-latest-tag-example
Browse files Browse the repository at this point in the history
docs: add example for latest tag with dynamic condition
  • Loading branch information
crazy-max committed Jan 14, 2022
2 parents e562237 + 5949fa2 commit 2cad85d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 2cad85d

Please sign in to comment.