File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ inputs:
1818 description : ' The version of prettier to install'
1919 required : false
2020 default : ' latest'
21+ fail_on_error :
22+ description : ' Whether the script should fail when linting errors are found'
23+ required : false
24+ default : true
2125
2226outputs :
2327 prettier_output :
3741 shell : bash
3842 run : echo "::set-output name=prettier-output::$(prettier --list-different --config ${{ inputs.config_path }} --ignore-path ${{ inputs.ignore_path }} --no-error-on-unmatched-pattern ${{ inputs.file_pattern }})"
3943
44+ - name : Fail On Error
45+ id : fail-on-error
46+ if : steps.prettier-run.outputs.prettier-output != 0 && steps.prettier-run.outputs.prettier-output != '' && inputs.fail_on_error
47+ shell : bash
48+ run : exit 1
49+
4050branding :
4151 icon : ' search'
4252 color : ' gray-dark'
You can’t perform that action at this time.
0 commit comments