allow additional_registries to have tag prefix
This commit is contained in:
parent
5aa14d4bca
commit
89b8bb6cb3
8
dist/index.js
vendored
8
dist/index.js
vendored
@ -62113,8 +62113,8 @@ function processAdditionalRegistries(targetRegistries) {
|
|||||||
const additionalRegistriesArr = additionalRegistries.split(',');
|
const additionalRegistriesArr = additionalRegistries.split(',');
|
||||||
for (let registry of additionalRegistriesArr) {
|
for (let registry of additionalRegistriesArr) {
|
||||||
registry = registry.trim();
|
registry = registry.trim();
|
||||||
if (registry.endsWith(':')) {
|
if (!registry.contains(':')) {
|
||||||
registry = registry.substring(0, registry.length - 1);
|
registry += ':';
|
||||||
}
|
}
|
||||||
targetRegistries.push(registry);
|
targetRegistries.push(registry);
|
||||||
}
|
}
|
||||||
@ -62220,7 +62220,7 @@ function prepareDestinations(registries, tags) {
|
|||||||
const destinations = [];
|
const destinations = [];
|
||||||
registries.forEach((registry) => {
|
registries.forEach((registry) => {
|
||||||
tags.forEach((tag) => {
|
tags.forEach((tag) => {
|
||||||
destinations.push(registry + ':' + tag);
|
destinations.push(registry + tag);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -62336,7 +62336,7 @@ try {
|
|||||||
|
|
||||||
let ci_registry = false;
|
let ci_registry = false;
|
||||||
if (core.getBooleanInput('add_ci_registry_target')) {
|
if (core.getBooleanInput('add_ci_registry_target')) {
|
||||||
ci_registry = information.ci_hostname + '/' + repoStr;
|
ci_registry = information.ci_hostname + '/' + repoStr + ':';
|
||||||
targetRegistries.push(ci_registry);
|
targetRegistries.push(ci_registry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,9 +3,11 @@ import * as github from '@actions/github';
|
|||||||
import * as action_information from 'information';
|
import * as action_information from 'information';
|
||||||
import {
|
import {
|
||||||
addCiRegistryAuth,
|
addCiRegistryAuth,
|
||||||
collectTags, executeDockerBuild,
|
collectTags,
|
||||||
|
executeDockerBuild,
|
||||||
mergeArgRegistryAuthJson,
|
mergeArgRegistryAuthJson,
|
||||||
prepareDestinations, prepareDockerArgs,
|
prepareDestinations,
|
||||||
|
prepareDockerArgs,
|
||||||
processAdditionalRegistries,
|
processAdditionalRegistries,
|
||||||
writeRegistryAuthJson
|
writeRegistryAuthJson
|
||||||
} from './lib';
|
} from './lib';
|
||||||
@ -22,7 +24,7 @@ try {
|
|||||||
|
|
||||||
let ci_registry = false;
|
let ci_registry = false;
|
||||||
if (core.getBooleanInput('add_ci_registry_target')) {
|
if (core.getBooleanInput('add_ci_registry_target')) {
|
||||||
ci_registry = information.ci_hostname + '/' + repoStr;
|
ci_registry = information.ci_hostname + '/' + repoStr + ':';
|
||||||
targetRegistries.push(ci_registry);
|
targetRegistries.push(ci_registry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,8 +11,8 @@ export function processAdditionalRegistries(targetRegistries) {
|
|||||||
const additionalRegistriesArr = additionalRegistries.split(',');
|
const additionalRegistriesArr = additionalRegistries.split(',');
|
||||||
for (let registry of additionalRegistriesArr) {
|
for (let registry of additionalRegistriesArr) {
|
||||||
registry = registry.trim();
|
registry = registry.trim();
|
||||||
if (registry.endsWith(':')) {
|
if (!registry.contains(':')) {
|
||||||
registry = registry.substring(0, registry.length - 1);
|
registry += ':';
|
||||||
}
|
}
|
||||||
targetRegistries.push(registry);
|
targetRegistries.push(registry);
|
||||||
}
|
}
|
||||||
@ -118,7 +118,7 @@ export function prepareDestinations(registries, tags) {
|
|||||||
const destinations = [];
|
const destinations = [];
|
||||||
registries.forEach((registry) => {
|
registries.forEach((registry) => {
|
||||||
tags.forEach((tag) => {
|
tags.forEach((tag) => {
|
||||||
destinations.push(registry + ':' + tag);
|
destinations.push(registry + tag);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user