mirror of
https://github.com/kitabisa/docker-slim-action.git
synced 2025-04-14 18:56:05 +00:00
feat: default continue mode behaviour
Signed-off-by: Dwi Siswanto <me@dw1.io>
This commit is contained in:
parent
192819dddf
commit
deb5cdee44
@ -202,6 +202,9 @@ The following input actions are supported:
|
||||
| `DSLIM_HTTP_PROBE_API_SPEC_FILE` | Run HTTP probes for API spec from file |
|
||||
</details>
|
||||
|
||||
> **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.<id>.outputs.report }}`.
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user