Skip to content

Commit

Permalink
feat: adapt logic to support updating run status without providing st…
Browse files Browse the repository at this point in the history
…ep information
  • Loading branch information
uleMeshcloud committed Nov 18, 2024
1 parent d238630 commit 3423d94
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ description: 'Sends the status of a step to the meshcloud API'
inputs:
step_id:
description: 'The ID of the step'
required: true
required: false
status:
description: 'The status of the step (SUCCEEDED or FAILED)'
required: true
required: false
user_message:
description: 'The user message for a failed step'
required: false
Expand Down
9 changes: 6 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ async function run() {

const data: any = {
status: finalStatus ? finalStatus : "IN_PROGRESS",
steps: [{
summary: summary
};

if (stepId) {
data.steps = [{
id: stepId,
status: status,
userMessage: userMessage,
systemMessage: systemMessage
}],
summary: summary
}]
};

core.debug(`Constructed data object: ${JSON.stringify(data)}`);
Expand Down

0 comments on commit 3423d94

Please sign in to comment.