ethangj/WireMock Runner

Push/pull mock API specs, run mock servers, and record API traffic using WireMock Cloud and WireMock Runner.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
api-tokenWireMock Cloud API token. Required for push/pull/environments-create and for post-run-pull in ephemeral mode. no
wiremock-dirPath to the directory containing wiremock.yaml (and profile files), relative to the workspace root. Default: .wiremock no.wiremock
runShell command to execute while the Runner container is live. When set, the Action starts a wiremock/wiremock-runner container, waits for it to be healthy, executes this command, then stops the container. SECURITY: this command runs via `bash -c` and inherits the full runner environment, including all workflow secrets. Never set this from untrusted GitHub event data (PR titles, issue bodies, workflow_dispatch inputs) — see the README's Security section. no
modeRunner mode for the ephemeral container. One of: serve, record-many. Default: serve. noserve
portsComma-separated list of mock API ports to expose from the container. Must match port values in wiremock.yaml. Example: '8080,8081' no8080
runner-admin-portPort for the Runner admin HTTP interface. Default: 9999. no9999
runner-versionDocker image tag for wiremock/wiremock-runner. Default: latest. nolatest
profileEnvironment profile name. Activates wiremock-<profile>.yaml overlay. Example: staging, development no
post-run-pullWhen 'true' and mode is record-many, automatically pull recorded stubs from WireMock Cloud after recording stops. Requires api-token. nofalse
commandCLI operation to perform. One of: push — push local stubs to WireMock Cloud pull — pull stubs from WireMock Cloud environments-create — create a new environment/profile in Cloud record-flush — flush buffered recordings to Cloud record-stop — switch Runner from record-many to serve record-flush-and-stop — flush then switch to serve (recommended) mode-switch — switch Runner to any mode resolve-urls — parse wiremock.yaml, verify Runner health, and emit service URLs as step outputs no
mock-apiName of the mock API as defined in wiremock.yaml. Used with push, pull, and environments-create. Optional when all: 'true'. no
allWhen 'true', passes --all to push/pull (processes all APIs). nofalse
runner-admin-urlBase URL of a running Runner's admin API. Used by record-flush, record-stop, record-flush-and-stop, mode-switch, and resolve-urls. Default: http://localhost:9999 nohttp://localhost:9999
include-servicesComma-separated list of service keys to record. When omitted, all services are recorded. Example: invoicing-api,payment-api no
target-modeTarget mode for the mode-switch command. One of: serve, record-many. no
runner-configYAML string of additional config fields passed to the Runner's mode-switch endpoint as the `config` object. Example: runner-config: | max-batch-requests: 50 no
forceWhen 'true' and command is environments-create, fail hard if the profile already exists instead of skipping silently. nofalse
wiremock-cli-versionnpm version tag for @wiremock/cli. Default: latest. nolatest
health-check-retriesNumber of times to poll /__/health before failing. Default: 30. no30
health-check-intervalSeconds between health check polls. Default: 2. no2
namedescription
mock-api-urlBase URL of the primary mock API (first service in wiremock.yaml).
mock-api-urlsJSON object mapping service name to base URL. Example: {"invoicing-api":"http://localhost:8080"}
runner-admin-urlRunner admin URL (confirmed live after health check).
recording-flushed'true' if recordings were successfully flushed to WireMock Cloud.