From 141ffd8d2f0b75e6fc7c87341331985448b62aa4 Mon Sep 17 00:00:00 2001 From: Ryosuke Sasaki Date: Thu, 19 Jan 2023 23:33:57 +0900 Subject: [PATCH] fix: exclude option doesn't work (#82) --- .github/workflows/test.yml | 2 ++ script.sh | 3 ++- testdata/Dockerfile.dockerignore | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 testdata/Dockerfile.dockerignore diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7f842d7..3a0f538 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,7 @@ jobs: with: reporter: github-check level: info + exclude: Dockerfile.dockerignore test-pr-review: if: github.event_name == 'pull_request' @@ -26,3 +27,4 @@ jobs: with: reporter: github-pr-review filter_mode: diff_context + exclude: Dockerfile.dockerignore diff --git a/script.sh b/script.sh index 6a32c5c..e3b84e4 100755 --- a/script.sh +++ b/script.sh @@ -20,7 +20,8 @@ export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}" EXCLUDES="" for exclude_path in $INPUT_EXCLUDE; do - EXCLUDES="$EXCLUDES --exclude='!$exclude_path'" + set -- --exclude="!${exclude_path}" + EXCLUDES="$EXCLUDES $*" done IGNORE_LIST="" diff --git a/testdata/Dockerfile.dockerignore b/testdata/Dockerfile.dockerignore new file mode 100644 index 0000000..6b8710a --- /dev/null +++ b/testdata/Dockerfile.dockerignore @@ -0,0 +1 @@ +.git