File tree Expand file tree Collapse file tree 2 files changed +28
-28
lines changed Expand file tree Collapse file tree 2 files changed +28
-28
lines changed Original file line number Diff line number Diff line change @@ -30,12 +30,39 @@ echo '::endgroup::'
30
30
31
31
export REVIEWDOG_GITHUB_API_TOKEN=" ${INPUT_GITHUB_TOKEN} "
32
32
33
+ docker_build_jq=' {
34
+ source: {
35
+ name: "docker-build-check",
36
+ url: "https://docs.docker.com/reference/build-checks/",
37
+ },
38
+ severity: "WARNING",
39
+ diagnostics: .warnings | map({
40
+ message: .description,
41
+ location: {
42
+ "path": $ENV.DOCKER_FILE_PATH,
43
+ "range": {
44
+ "start": {
45
+ "line": .location.ranges[].start.line
46
+ },
47
+ "end": {
48
+ "line": .location.ranges[].end.line
49
+ },
50
+ },
51
+ },
52
+ severity: "WARNING",
53
+ code: {
54
+ "value": .ruleName,
55
+ "url": .url,
56
+ },
57
+ })
58
+ }'
59
+
33
60
docker_files=$( git ls-files --exclude=' *Dockerfile*' --ignored --cached)
34
61
35
62
for docker_file in " ${docker_files[@]} " ; do
36
63
export DOCKER_FILE_PATH=${docker_file}
37
64
check_result=$( docker build -f " ${docker_file} " --call=check,format=json . || true)
38
- echo " $check_result " | jq -f to-rdjson.jq \
65
+ echo " $check_result " | jq " $docker_build_jq " \
39
66
| reviewdog -f=rdjson -name=" docker-build-check" \
40
67
-reporter=" ${INPUT_REPORTER} " \
41
68
-filter-mode=" ${INPUT_FILTER_MODE} " \
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments