@@ -85,13 +85,17 @@ runs:
85
85
steps :
86
86
- id : setup-java
87
87
if : ${{ inputs.java-version != null }}
88
- uses : actions/setup-java@v3
88
+ uses : actions/setup-java@v4
89
89
with :
90
90
distribution : ' ${{ inputs.java-distribution }}'
91
91
java-version : ${{ inputs.java-version }}
92
92
93
- - run : echo '${{ github.action_path }}/bin' >>${GITHUB_PATH}
94
- shell : bash
93
+ - id : download-diktat
94
+ uses : robinraju/release-downloader@v1.8
95
+ with :
96
+ repository : " nulls/diktat"
97
+ tag : " v2.0.0"
98
+ fileName : " diktat"
95
99
96
100
# GitHub seems to set `-e` internally, so don't fail immediately if diKTat
97
101
# returns a non-zero exit code but store the exit code in a variable for
@@ -101,8 +105,7 @@ runs:
101
105
# `steps.diktat.outputs.exit-code` variable.
102
106
- id : diktat
103
107
run : |
104
- DIKTAT_ARGS=('--config=${{ inputs.config }}')
105
- DIKTAT_ARGS=('--reporter=${{ inputs.reporter }}')
108
+ DIKTAT_ARGS=('--config', '${{ inputs.config }}', '--reporter', '${{ inputs.reporter }}')
106
109
if [[ '${{ inputs.color }}' != 'false' ]]
107
110
then
108
111
DIKTAT_ARGS+=('--color')
@@ -119,7 +122,7 @@ runs:
119
122
set -o pipefail
120
123
IFS=$'\n'
121
124
INPUT_PATHS=(${{ inputs.input-paths }})
122
- { diktat --no-download-progress --verbose "${DIKTAT_ARGS[@]}" "${INPUT_PATHS[@]}" | tee diktat.log; } && exit_code=$? || exit_code=$?
125
+ { diktat "${DIKTAT_ARGS[@]}" "${INPUT_PATHS[@]}" | tee diktat.log; } && exit_code=$? || exit_code=$?
123
126
echo "summary-line=$(tail -n1 diktat.log 2>/dev/null)" >>$GITHUB_OUTPUT
124
127
rm -f diktat.log
125
128
echo "exit-code=${exit_code}" >>$GITHUB_OUTPUT
0 commit comments