mirror of
https://github.com/redhat-actions/push-to-registry.git
synced 2025-05-19 13:44:45 +00:00
Support docker/metadata-action
This commit is contained in:
parent
1d3fd04cee
commit
6b269c55d3
7 changed files with 276 additions and 67 deletions
11
src/util.ts
11
src/util.ts
|
@ -6,3 +6,14 @@
|
|||
export function splitByNewline(s: string): string[] {
|
||||
return s.split(/\r?\n/);
|
||||
}
|
||||
|
||||
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}`;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue