-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
28 lines (28 loc) · 994 Bytes
/
action.yml
File metadata and controls
28 lines (28 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: "mockoon-cli"
description: "Run Mockoon CLI as a GitHub Action"
branding:
color: "white"
inputs:
version:
description: "Mockoon CLI version to pull from NPM"
required: true
default: "latest"
data-file:
description: "Mockoon CLI data file (local file or URL, can be multiple, space separated, e.g., 'file1.json file2.json')"
required: true
port:
description: "Mockoon CLI port (can be multiple, space separated, e.g., '3000 4000')"
required: true
default: "3000"
extra-args:
description: "Extra arguments to pass to Mockoon CLI (e.g., '--faker-locale en_GB --disable-routes users --env-vars-prefix MY_PREFIX_')"
required: false
runs:
using: "composite"
steps:
- name: "Run Mockoon CLI"
shell: bash
# use & to run in background for >4.0.0
run: |
npm install -g @mockoon/cli@${{ inputs.version }}
mockoon-cli start --data ${{ inputs.data-file }} --port ${{ inputs.port }} ${{ inputs.extra-args }} &