From 80654459706cf23b97efd8a7bc760d32d3668b13 Mon Sep 17 00:00:00 2001 From: David Hiendl Date: Wed, 6 Dec 2023 15:41:24 +0100 Subject: [PATCH] add tags_additional option --- action.yml | 3 +++ dist/index.js | 9 +++++++++ src/lib.js | 9 +++++++++ 3 files changed, 21 insertions(+) diff --git a/action.yml b/action.yml index bb906ea..c748f64 100644 --- a/action.yml +++ b/action.yml @@ -36,6 +36,9 @@ inputs: description: "" default: "true" + tags_additional: + description: "list of additional tags to add, as CSV" + tag_semver_enable: description: "set to false to disable semver tagging completely" default: "true" diff --git a/dist/index.js b/dist/index.js index 439fbd9..5c43673 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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 if (core.getBooleanInput('tag_commit_enable') && isNonEmptyStr(github.context.sha)) { tags.push(tagPrefix + tagCommitPrefix + github.context.sha + tagSuffix); diff --git a/src/lib.js b/src/lib.js index 32c0944..d2da537 100644 --- a/src/lib.js +++ b/src/lib.js @@ -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 if (core.getBooleanInput('tag_commit_enable') && isNonEmptyStr(github.context.sha)) { tags.push(tagPrefix + tagCommitPrefix + github.context.sha + tagSuffix);