mirror of
https://github.com/docker/metadata-action.git
synced 2025-08-16 19:29:53 +08:00
Add format attribute for type=sha
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
12
README.md
12
README.md
@@ -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
|
||||
|
Reference in New Issue
Block a user