You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,8 +33,9 @@ This GitHub Action allows you to run Mockoon CLI in your workflows.
33
33
Several parameters are available to customize the behavior of the action:
34
34
35
35
- The `version` of the CLI, default to `latest`.
36
-
- The `data-file`, pointing to a [Mockoon data file](https://mockoon.com/docs/latest/mockoon-data-files/data-files-location/) stored in the repository.
37
-
- A `port` on which the mock server will run, default to `3000`.
36
+
- The `data-file`, pointing to one or more [Mockoon data file](https://mockoon.com/docs/latest/mockoon-data-files/data-files-location/) stored in the repository (or URLs), space separated: e.g., `file1.json file2.json`.
37
+
- One or more `port` on which the mock server(s) will run, default to `3000`: e.g., `3000 4000`.
38
+
- Additional `extra-args` to pass to Mockoon CLI: e.g., `--faker-locale en_GB --disable-routes users --env-vars-prefix MY_PREFIX_`.
38
39
39
40
```yaml
40
41
name: Mockoon CLI demo
@@ -48,16 +49,18 @@ jobs:
48
49
mockoon-cli-demo:
49
50
runs-on: ubuntu-latest
50
51
steps:
51
-
- uses: actions/checkout@v3
52
+
- uses: actions/checkout@v6
52
53
- name: Run Mockoon CLI
53
-
uses: mockoon/cli-action@v2
54
+
uses: mockoon/cli-action@v3
54
55
with:
55
56
# Mockoon CLI version, default to 'latest'
56
57
version: "latest"
57
58
# Mockoon local data file or URL
58
59
data-file: "./mockoon-data.json"
59
60
# port, default to 3000
60
61
port: 3000
62
+
# extra arguments to pass to Mockoon CLI
63
+
extra-args: "--faker-locale en_GB"
61
64
- name: Make test call
62
65
run: curl -X GET http://localhost:3000/endpoint
63
66
```
@@ -69,7 +72,7 @@ This action is compatible with the following Mockoon CLI versions:
0 commit comments