rename additional_registry_destinations to additional_destinations, process additional_destinations as CSV and add values as absolute --tag arguments

This commit is contained in:
David Hiendl 2023-12-06 23:21:30 +01:00
parent 8aad01c12f
commit a35b746068
3 changed files with 49 additions and 30809 deletions

View File

@ -33,7 +33,7 @@ inputs:
default: "true" default: "true"
tags_additional: tags_additional:
description: "list of additional tags to add, as CSV" description: "list of additional tags to add as CSV for each registry configured"
tag_semver_enable: tag_semver_enable:
description: "set to false to disable semver tagging completely" description: "set to false to disable semver tagging completely"
@ -51,14 +51,10 @@ inputs:
description: "" description: ""
default: "true" default: "true"
additional_registry_destinations: additional_destinations:
description: "a list of --destination registry/orga/repo:tag strings, space separated" description: "a list of registry/owner/repo:tag strings, csv separated. These tags are created and pushed as is without modifications like prefix."
default: "" default: ""
squash_layers:
description: ""
default: "true"
additional_registries: additional_registries:
description: "" description: ""
default: "" default: ""
@ -79,6 +75,10 @@ inputs:
description: "" description: ""
default: "true" default: "true"
squash_layers:
description: ""
default: "true"
docker_push: docker_push:
description: "Push all build tags to destinations" description: "Push all build tags to destinations"
default: "true" default: "true"

30835
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -201,8 +201,13 @@ export function prepareDockerArgs(destinations) {
dockerArgs.push('--tag ' + dest); dockerArgs.push('--tag ' + dest);
}); });
if (isNonEmptyStr(core.getInput('additional_registry_destinations'))) { if (isNonEmptyStr(core.getInput('additional_destinations'))) {
dockerArgs.push(core.getInput('additional_registry_destinations')); core.getInput('additional_destinations')
.split(',')
.map(s => s.trim())
.forEach(dst => {
dockerArgs.push('--tag ' + dst);
});
} }
if (isNonEmptyStr(core.getInput('build_args'))) { if (isNonEmptyStr(core.getInput('build_args'))) {