Refactor inputs to support docker/metadata-action (#76)

This commit is contained in:
なつき 2021-10-12 10:21:52 -07:00 committed by GitHub
parent f123b1f960
commit 979e6a6c6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 142 additions and 23 deletions

View file

@ -110,3 +110,14 @@ export function getInputList(name: string): string[] {
[],
);
}
export function isFullImageName(image: string): boolean {
return image.indexOf(":") > 0;
}
export function getFullImageName(image: string, tag: string): string {
if (isFullImageName(tag)) {
return tag;
}
return `${image}:${tag}`;
}