mirror of
https://github.com/docker/metadata-action.git
synced 2025-07-05 09:48:24 +02:00
increase short commit hash length to 12 for uniqueness
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@ -307,7 +307,7 @@ export class Meta {
|
||||
|
||||
let val = this.context.sha;
|
||||
if (tag.attrs['format'] === tcl.ShaFormat.Short) {
|
||||
val = this.context.sha.substring(0, 7);
|
||||
val = this.context.sha.substring(0, 12);
|
||||
}
|
||||
|
||||
const vraw = this.setValue(val, tag);
|
||||
@ -373,7 +373,7 @@ export class Meta {
|
||||
return context.ref.replace(/^refs\/tags\//g, '');
|
||||
},
|
||||
sha: function () {
|
||||
return context.sha.substring(0, 7);
|
||||
return context.sha.substring(0, 12);
|
||||
},
|
||||
base_ref: function () {
|
||||
if (/^refs\/tags\//.test(context.ref) && context.payload?.base_ref != undefined) {
|
||||
|
Reference in New Issue
Block a user