Improving sorting of matrix keys

This commit is contained in:
Michael B. Gale
2026-01-20 13:21:16 +00:00
parent 7e96d45489
commit 9a57e78a04
5 changed files with 15 additions and 20 deletions
+3 -4
View File
@@ -260,10 +260,9 @@ export function getArtifactSuffix(matrix: string | undefined): string {
let suffix = "";
if (matrix) {
try {
for (const [, matrixVal] of Object.entries(
JSON.parse(matrix) as any[][],
).sort())
suffix += `-${matrixVal}`;
const matrixObject = JSON.parse(matrix) as any[][];
for (const matrixKey of Object.keys(matrixObject).sort())
suffix += `-${matrixObject[matrixKey]}`;
} catch {
core.info(
"Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input.",