add tags_additional option

This commit is contained in:
David Hiendl 2023-12-06 15:41:24 +01:00
parent 7fb1ffb6a6
commit 8065445970
3 changed files with 21 additions and 0 deletions

View File

@ -36,6 +36,9 @@ inputs:
description: "" description: ""
default: "true" default: "true"
tags_additional:
description: "list of additional tags to add, as CSV"
tag_semver_enable: tag_semver_enable:
description: "set to false to disable semver tagging completely" description: "set to false to disable semver tagging completely"
default: "true" default: "true"

9
dist/index.js vendored
View File

@ -62232,6 +62232,15 @@ function collectTags(information) {
} }
} }
// handle additional tags
core.getInput('tags_additional')
.split(',')
.map(s => s.trim())
.filter(s => s.length > 0)
.forEach(t => {
tags.push(t);
});
// handle commit sha // handle commit sha
if (core.getBooleanInput('tag_commit_enable') && isNonEmptyStr(github.context.sha)) { if (core.getBooleanInput('tag_commit_enable') && isNonEmptyStr(github.context.sha)) {
tags.push(tagPrefix + tagCommitPrefix + github.context.sha + tagSuffix); tags.push(tagPrefix + tagCommitPrefix + github.context.sha + tagSuffix);

View File

@ -128,6 +128,15 @@ export function collectTags(information) {
} }
} }
// handle additional tags
core.getInput('tags_additional')
.split(',')
.map(s => s.trim())
.filter(s => s.length > 0)
.forEach(t => {
tags.push(t);
});
// handle commit sha // handle commit sha
if (core.getBooleanInput('tag_commit_enable') && isNonEmptyStr(github.context.sha)) { if (core.getBooleanInput('tag_commit_enable') && isNonEmptyStr(github.context.sha)) {
tags.push(tagPrefix + tagCommitPrefix + github.context.sha + tagSuffix); tags.push(tagPrefix + tagCommitPrefix + github.context.sha + tagSuffix);