Skip to content

Commit

Permalink
feat: replace - separator with . in identifier (#273)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
rdhar authored Aug 9, 2024
1 parent 6104dec commit 8888e3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions action.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8888e3c

Please sign in to comment.