From d8d686af014013c856f037dc5fccee3c934a3f43 Mon Sep 17 00:00:00 2001 From: Martin Nygren Date: Thu, 28 May 2026 10:42:49 +0100 Subject: [PATCH 1/2] fix: removes the -t argument from imposter down. --- stop-mocks/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stop-mocks/action.yml b/stop-mocks/action.yml index bc76c6d..277ea23 100644 --- a/stop-mocks/action.yml +++ b/stop-mocks/action.yml @@ -12,4 +12,4 @@ runs: steps: - name: Stop Imposter server shell: bash - run: imposter down -t ${{ inputs.engine-type }} \ No newline at end of file + run: imposter down ${{ inputs.engine-type }} \ No newline at end of file From e499a8c5b62c3ffafc8ccacaab858fe36be14a18 Mon Sep 17 00:00:00 2001 From: Pete Cornish Date: Thu, 28 May 2026 17:34:06 +0100 Subject: [PATCH 2/2] fix: stop all mocks in stop-mocks and deprecate engine-type The imposter-cli down command dropped the -t/--engine-type flag and now takes a positional mock ID or --all. Passing the engine type as a value made it parse as a mock ID, so stop the run with --all instead and mark the engine-type input deprecated, warning when it is set. --- README.md | 10 ++++------ stop-mocks/action.yml | 13 +++++++++---- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 0766317..475554f 100644 --- a/README.md +++ b/README.md @@ -48,15 +48,15 @@ Starts the Imposter mock server in the background, and waits for it to be ready. - `base-url`: Base URL of the mock server (e.g. `http://localhost:8080`) ### 3. Stop Mocks (`stop-mocks`) -Stops the running Imposter mock server. +Stops all running Imposter mock servers, regardless of engine type. ```yaml - uses: imposter-project/imposter-github-action/stop-mocks@v1 - with: - # Optional: Type of mock engine to use (jvm or docker) - engine-type: 'docker' # default: 'docker' ``` +> [!NOTE] +> The `engine-type` input is deprecated and ignored; all managed mocks are stopped regardless of engine type. + ## Sample Workflow Here's a complete example showing how to use all three actions in a workflow: @@ -101,8 +101,6 @@ jobs: # Stop mock server - name: Stop Mocks uses: imposter-project/imposter-github-action/stop-mocks@v1 - with: - engine-type: 'docker' # Should match the engine-type used in start-mocks ``` ## Configuration diff --git a/stop-mocks/action.yml b/stop-mocks/action.yml index 277ea23..358c711 100644 --- a/stop-mocks/action.yml +++ b/stop-mocks/action.yml @@ -1,15 +1,20 @@ name: 'Stop Imposter Mocks' -description: 'Stops the running Imposter mock server' +description: 'Stops all running Imposter mock servers' inputs: engine-type: - description: 'Type of mock engine to use (jvm or docker)' + description: 'Deprecated and ignored. All managed mocks are stopped regardless of engine type.' required: false - default: 'docker' + deprecationMessage: "The 'engine-type' input is deprecated and no longer used; all managed mocks are stopped regardless of engine type." runs: using: "composite" steps: + - name: Warn on deprecated engine-type input + if: ${{ inputs.engine-type != '' }} + shell: bash + run: echo "::warning title=Deprecated input::The 'engine-type' input of stop-mocks is deprecated and no longer used; all managed mocks are stopped regardless of engine type." + - name: Stop Imposter server shell: bash - run: imposter down ${{ inputs.engine-type }} \ No newline at end of file + run: imposter down --all