Include matrix information in debug artifact name

This commit is contained in:
Edoardo Pirovano
2021-11-04 18:19:51 +00:00
parent 0442e71a2a
commit 375c14729e
5 changed files with 17 additions and 5 deletions

View File

@@ -237,8 +237,14 @@ async function run() {
}
async function uploadDebugArtifacts(toUpload: string[], rootDir: string) {
let suffix = "";
const matrix = actionsUtil.getRequiredInput("matrix");
if (matrix !== undefined && matrix !== "null") {
for (const entry of Object.entries(JSON.parse(matrix)).sort())
suffix += `-${entry[1]}`;
}
await artifact.create().uploadArtifact(
DEBUG_ARTIFACT_NAME,
`${DEBUG_ARTIFACT_NAME}${suffix}`,
toUpload.map((file) => path.normalize(file)),
path.normalize(rootDir)
);