From 8888e3c649abbeea436ef3d1f6664dd8dc6c7a3e Mon Sep 17 00:00:00 2001 From: Rishav Dhar <19497993+RDhar@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:13:31 +0100 Subject: [PATCH] feat: replace `-` separator with `.` in identifier (#273) * replace `-` separator with `.` Big thanks to @p4perf4ce for contributing. Signed-off-by: Rishav Dhar <19497993+RDhar@users.noreply.github.com> * reorder `tf_tool` positioning in `tf_identifier` Signed-off-by: Rishav Dhar <19497993+RDhar@users.noreply.github.com> --------- Signed-off-by: Rishav Dhar <19497993+RDhar@users.noreply.github.com> --- action.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.js b/action.js index f7112c78..2cceb718 100644 --- a/action.js +++ b/action.js @@ -29,18 +29,18 @@ module.exports = async ({ context, core, exec, github }) => { // Unique identifier of the TF run for later retrieval. const tf_identifier = [ + process.env.tf_tool, pr_number, process.env.arg_chdir, process.env.arg_workspace_alt, process.env.arg_backend_config, process.env.arg_var_file, process.env.arg_destroy, - process.env.tf_tool, process.env.arg_out, ] .filter((arg) => arg) .map((arg) => String(arg).replace(/[^a-zA-Z0-9]/g, "-")) - .join("-"); + .join("."); core.setOutput("identifier", tf_identifier); // Capture TF command input and outputs.