Skip to content

Commit 5a01b3c

Browse files
committed
feat: disables auto restart by default.
1 parent 6f9823a commit 5a01b3c

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Starts the Imposter mock server in the background, and waits for it to be ready.
3232
<details>
3333
<summary>Advanced configuration options</summary>
3434

35+
- `auto-restart`: Whether to automatically restart when configuration changes (default: false)
3536
- `max-attempts`: Maximum number of attempts to check if the server is ready (default: 30)
3637
- `retry-interval`: Interval in seconds between retry attempts (default: 1)
3738

start-mocks/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ inputs:
2222
description: 'Whether to recursively scan the config directory for mock configurations'
2323
required: false
2424
default: 'false'
25+
auto-restart:
26+
description: 'Whether to automatically restart the mock server when configuration changes'
27+
required: false
28+
default: 'false'
2529
max-attempts:
2630
description: 'Maximum number of attempts to check if the server is ready'
2731
required: false
@@ -53,7 +57,7 @@ runs:
5357
if [ ! -z "${{ inputs.version }}" ]; then
5458
cmd="$cmd -v ${{ inputs.version }}"
5559
fi
56-
cmd="$cmd --recursive-config-scan=${{ inputs.config-scan-recursive }} \"${{ inputs.config-dir }}\""
60+
cmd="$cmd --recursive-config-scan=${{ inputs.recursive-config-scan }} --auto-restart=${{ inputs.auto-restart }} \"${{ inputs.config-dir }}\""
5761
5862
# Start the server
5963
eval "$cmd" &

0 commit comments

Comments
 (0)