File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ ENV PATH="~/.local/bin:${PATH}"
66
77RUN pip install pip setuptools --upgrade
88
9- RUN pip install scanapi
10-
119ENTRYPOINT ["/entrypoint.sh" ]
1210
1311COPY entrypoint.sh /entrypoint.sh
Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ An action that allows developers to run ScanAPI using github actions.
55
66## Inputs
77
8+ ### ` scanapi_version `
9+
10+ The version of ScanAPI to install (default: latest).
11+
812### ` arguments `
913
1014Desired arguments to run scanapi. Allow multiple parameters separated by spaces. Default value is ` --help `
@@ -17,6 +21,7 @@ The following will take the yaml file and produce a scanapi-report.html file as
1721- name : Run automated API tests
1822 uses : scanapi/github-action@v1
1923 with :
24+ scanapi_version : ' ==2.0.0'
2025 arguments : ' run ./scanapi.yaml'
2126` ` `
2227
Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ branding:
55 icon : " align-justify"
66 color : " gray-dark"
77inputs :
8+ scanapi_version :
9+ description : ' The ScanAPI version to be installed'
10+ required : false
11+ default : ' latest'
812 arguments :
913 description : " Desired arguments to run ScanAPI. Allow multiple parameters separated by spaces."
1014 required : true
1317 using : " docker"
1418 image : " Dockerfile"
1519 args :
20+ - ${{ inputs.scanapi_version }}
1621 - ${{ inputs.arguments }}
Original file line number Diff line number Diff line change 22
33set -e
44
5- sh -c " scanapi $* "
5+ if [ $1 != ' latest' ]; then
6+ pip install scanapi$1
7+ else
8+ pip install scanapi
9+ fi
10+
11+ sh -c " scanapi ${@: 2} "
You can’t perform that action at this time.
0 commit comments