File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,23 @@ inputs:
2020 description : The format of the report that OpenFastTrace should produce.
2121 default : " plain"
2222 required : false
23+ fail-on-error :
24+ description : |
25+ By default, the action will never fail but indicate the result of running the trace command in the "oft-exit-code" output variable.
26+ Setting this parameter to "true" will let the Action return the exit code produced by running OpenFastTrace.
27+ default : " false"
28+ required : false
2329outputs :
2430 oft-exit-code :
2531 description : |
26- The exit code indicating the outcome of running OpenFastTrace (0: success, 1 : failure).
32+ The exit code indicating the outcome of running OpenFastTrace (0: success, > 0 : failure).
2733 The report is created in any case, as long as OpenFastTrace could be run at all.
2834
2935runs :
3036 using : " docker"
3137 image : " Dockerfile"
3238 args :
39+ - ${{ inputs.fail-on-error }}
3340 - ${{ inputs.report-filename }}
3441 - ${{ inputs.report-format }}
3542 - ${{ inputs.file-patterns }}
Original file line number Diff line number Diff line change 11#! /bin/sh
22
33# [impl->req~run-oft-trace-command~1]
4-
5- report_file_name=$1
6- report_format=$2
7- files=$3
4+ fail_on_error= $1
5+ report_file_name=$2
6+ report_format=$3
7+ files=$4
88
99echo " ::notice::using OpenFastTrace JARs from: ${LIB_DIR} "
1010
1919 echo " oft-exit-code=0" >> " ${GITHUB_OUTPUT} "
2020 echo " All specification items are covered." >> " ${GITHUB_STEP_SUMMARY} "
2121else
22- echo " oft-exit-code=$? " >> " ${GITHUB_OUTPUT} "
22+ oft_exit_code=$?
23+ echo " oft-exit-code=${oft_exit_code} " >> " ${GITHUB_OUTPUT} "
2324 echo " Some specification items are not covered. See created report (${report_file_name} ) for details." >> " ${GITHUB_STEP_SUMMARY} "
25+ if [ " ${fail_on_error} " = " true" ]; then
26+ exit ${oft_exit_code}
27+ fi
2428fi
You can’t perform that action at this time.
0 commit comments