mirror of
https://code.forgejo.org/docker/metadata-action.git
synced 2025-08-11 00:20:53 +00:00
Add format attribute for type=sha
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
2af9c6a52b
commit
8841ef4bb7
6 changed files with 111 additions and 11 deletions
|
@ -224,7 +224,13 @@ export class Meta {
|
|||
if (!this.context.sha) {
|
||||
return version;
|
||||
}
|
||||
const vraw = this.setValue(this.context.sha.substr(0, 7), tag);
|
||||
|
||||
let val = this.context.sha;
|
||||
if (tag.attrs['format'] === tcl.ShaFormat.Short) {
|
||||
val = this.context.sha.substr(0, 7);
|
||||
}
|
||||
|
||||
const vraw = this.setValue(val, tag);
|
||||
return Meta.setVersion(version, vraw, this.flavor.latest == 'auto' ? false : this.flavor.latest == 'true');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue