Skip to content

bundle files to use from other repos #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,39 @@ echo '::endgroup::'

export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"

docker_build_jq='{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Expressions don't expand in single quotes, use double quotes for that. SC2016

source: {
name: "docker-build-check",
url: "https://docs.docker.com/reference/build-checks/",
},
severity: "WARNING",
diagnostics: .warnings | map({
message: .description,
location: {
"path": $ENV.DOCKER_FILE_PATH,
"range": {
"start": {
"line": .location.ranges[].start.line
},
"end": {
"line": .location.ranges[].end.line
},
},
},
severity: "WARNING",
code: {
"value": .ruleName,
"url": .url,
},
})
}'

docker_files=$(git ls-files --exclude='*Dockerfile*' --ignored --cached)

for docker_file in "${docker_files[@]}" ; do
export DOCKER_FILE_PATH=${docker_file}
check_result=$(docker build -f "${docker_file}" --call=check,format=json . || true)
echo "$check_result" | jq -f to-rdjson.jq \
echo "$check_result" | jq "$docker_build_jq" \
| reviewdog -f=rdjson -name="docker-build-check" \
-reporter="${INPUT_REPORTER}" \
-filter-mode="${INPUT_FILTER_MODE}" \
Expand Down
27 changes: 0 additions & 27 deletions to-rdjson.jq

This file was deleted.