diff --git a/dist/index.js b/dist/index.js index c7ebf14..58fd555 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2175,10 +2175,13 @@ function run() { } const buildStart = util.getTimestamp(); const traceComponents = [ + util.getEnv('GITHUB_REPOSITORY'), util.getEnv('GITHUB_WORKFLOW'), util.getEnv('GITHUB_JOB'), util.getEnv('GITHUB_RUN_NUMBER'), - core.getInput('matrix-key') + core.getInput('matrix-key'), + // append a random number to ensure traceId is unique when the workflow is re-run + util.randomInt(Math.pow(2, 32)).toString() ]; const traceId = util.replaceSpaces(traceComponents.filter(value => value).join('-')); // save buildStart to be used in the post section diff --git a/src/index.ts b/src/index.ts index 617f717..ccfa912 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,10 +11,13 @@ async function run(): Promise { const buildStart = util.getTimestamp() const traceComponents = [ + util.getEnv('GITHUB_REPOSITORY'), util.getEnv('GITHUB_WORKFLOW'), util.getEnv('GITHUB_JOB'), util.getEnv('GITHUB_RUN_NUMBER'), - core.getInput('matrix-key') + core.getInput('matrix-key'), + // append a random number to ensure traceId is unique when the workflow is re-run + util.randomInt(2 ** 32).toString() ] const traceId = util.replaceSpaces(traceComponents.filter(value => value).join('-'))