diff --git a/README.md b/README.md index 2b4a34e..ec9f3da 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,9 @@ The following input actions are supported: | `DSLIM_HTTP_PROBE_API_SPEC_FILE` | Run HTTP probes for API spec from file | +> **Note** +> Please note that when you disable HTTP probing (either by setting `DSLIM_HTTP_PROBE_OFF` to `true` or `DSLIM_HTTP_PROBE` to `false`), it will effectively modify the behavior of the continue mode (if the `DSLIM_CONTINUE_AFTER` value is undefined) by imposing a timeout of **1** second. This adjustment occurs because, by default, when HTTP probes are disabled, the Slim's behavior will switch to '**enter**' mode — and there is no way to interact with the temporary container created by Slim within the GitHub Action runner. + ## Outputs To view the report results generated by the Slim build command, you can access the `report` property (`Object`) of the `steps` outputs context. Here's an example of how to access it: `${{ steps..outputs.report }}`. diff --git a/src/index.ts b/src/index.ts index 209628c..71469ed 100644 --- a/src/index.ts +++ b/src/index.ts @@ -126,7 +126,13 @@ async function run() { core.info(`slim on target: ${inputTarget}`); - await shell.exec('slim', ['b', '--target', inputTarget], {cwd: SLIM_PATH}); + let args = ['b', '--target', inputTarget]; + + if (process.env['DSLIM_HTTP_PROBE_OFF'] == 'true' || process.env['DSLIM_HTTP_PROBE'] == 'false') { + if (typeof process.env['DSLIM_CONTINUE_AFTER'] === 'undefined') args.push('--continue-after', '1') + } + + await shell.exec('slim', args, {cwd: SLIM_PATH}); const data = fs.readFileSync(path.join(SLIM_PATH, 'slim.report.json')); const report = JSON.parse(data);