diff --git a/dist/index.js b/dist/index.js index 8d87a31..507e20f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -28045,6 +28045,11 @@ async function run() { core.setFailed(error instanceof Error ? error.message : 'Unknown error occurred while parsing outputs_json'); return; } + // when the user attempst to only resolve the run, provide a failure message + if ((stepStatus || userMessage || systemMessage || outputsJsonInput) && !stepId) { + core.setFailed('step_id must be provided when setting step_status, user_message, system_message, or outputs_json'); + return; + } const tempDir = process.env.RUNNER_TEMP || os.tmpdir(); core.debug(`Temporary directory: ${tempDir}`); console.log(`Temporary directory: ${tempDir}`); // This will also print the path to the console diff --git a/src/index.ts b/src/index.ts index befe4d9..f926157 100644 --- a/src/index.ts +++ b/src/index.ts @@ -39,6 +39,12 @@ async function run() { return; } + // when the user attempst to only resolve the run, provide a failure message + if ((stepStatus || userMessage || systemMessage || outputsJsonInput) && !stepId) { + core.setFailed('step_id must be provided when setting step_status, user_message, system_message, or outputs_json'); + return; + } + const tempDir = process.env.RUNNER_TEMP || os.tmpdir(); core.debug(`Temporary directory: ${tempDir}`); console.log(`Temporary directory: ${tempDir}`); // This will also print the path to the console