Fix matrix job for when workflow jobs have no name
Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
12
src/act.ts
12
src/act.ts
@@ -455,15 +455,15 @@ export class Act {
|
|||||||
if (parsedMessage.jobID in commandArgs.workflow.yaml.jobs && commandArgs.workflow.yaml.jobs[parsedMessage.jobID].name) {
|
if (parsedMessage.jobID in commandArgs.workflow.yaml.jobs && commandArgs.workflow.yaml.jobs[parsedMessage.jobID].name) {
|
||||||
// Use the name set for the job by the user
|
// Use the name set for the job by the user
|
||||||
jobName = commandArgs.workflow.yaml.jobs[parsedMessage.jobID].name;
|
jobName = commandArgs.workflow.yaml.jobs[parsedMessage.jobID].name;
|
||||||
|
|
||||||
// Update name if it is a matrix
|
|
||||||
if (parsedMessage.matrix && Object.keys(parsedMessage.matrix).length > 0) {
|
|
||||||
const matrixValues = Object.values(parsedMessage.matrix).join(", ");
|
|
||||||
jobName = `${jobName} (${matrixValues})`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (error: any) { }
|
} catch (error: any) { }
|
||||||
|
|
||||||
|
// Update name if it is a matrix
|
||||||
|
if (parsedMessage.matrix && Object.keys(parsedMessage.matrix).length > 0) {
|
||||||
|
const matrixValues = Object.values(parsedMessage.matrix).join(", ");
|
||||||
|
jobName = `${jobName} (${matrixValues})`;
|
||||||
|
}
|
||||||
|
|
||||||
let jobIndex = this.historyManager.workspaceHistory[commandArgs.path][historyIndex].jobs!
|
let jobIndex = this.historyManager.workspaceHistory[commandArgs.path][historyIndex].jobs!
|
||||||
.findIndex(job => job.name === jobName);
|
.findIndex(job => job.name === jobName);
|
||||||
if (jobIndex < 0) {
|
if (jobIndex < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user