Add format attribute for type=sha

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2021-05-11 20:14:23 +02:00
parent 2af9c6a52b
commit 8841ef4bb7
6 changed files with 111 additions and 11 deletions

View File

@@ -528,13 +528,21 @@ tags: |
type=sha
```
Output Git short commit as Docker tag like `sha-ad132f5`.
```yaml
tags: |
# minimal using short sha
type=sha
# full length sha
type=sha,format=long
```
Output Git short commit (or long if specified) as Docker tag like `sha-ad132f5`.
Extended attributes and default values:
```yaml
tags: |
type=sha,enable=true,priority=100,prefix=sha-,suffix=
type=sha,enable=true,priority=100,prefix=sha-,suffix=,format=short
```
## Notes