diff --git a/action.yaml b/action.yaml index 9bc8177..eb6d35c 100644 --- a/action.yaml +++ b/action.yaml @@ -65,6 +65,9 @@ inputs: description: Negative scope filter to apply to impacted targets required: false default: //external + test-negative-tag-filter: + description: Negative tag filter to apply to impacted targets + required: false runs: using: composite @@ -171,4 +174,5 @@ runs: BAZEL_SCOPE_FILTER: ${{ inputs.test-scope-filter }} BAZEL_NEGATIVE_KIND_FILTER: ${{ inputs.test-negative-kind-filter }} BAZEL_NEGATIVE_SCOPE_FILTER: ${{ inputs.test-negative-scope-filter }} + BAZEL_NEGATIVE_TAG_FILTER: ${{ inputs.test-negative-tag-filter }} CI: "true" diff --git a/src/scripts/test_impacted_targets.sh b/src/scripts/test_impacted_targets.sh index 1a7d942..7ab64e1 100755 --- a/src/scripts/test_impacted_targets.sh +++ b/src/scripts/test_impacted_targets.sh @@ -30,6 +30,9 @@ fi echo "let targets = kind('${BAZEL_KIND_FILTER}', \$targets) in" >&3 # trunk-ignore(shellcheck/SC2016) echo '$targets' >&3 +if [[ -n ${BAZEL_NEGATIVE_TAG_FILTER} ]]; then + echo "- attr('tags', '${BAZEL_NEGATIVE_TAG_FILTER}', \$targets)" >&3 +fi if [[ -n ${BAZEL_NEGATIVE_KIND_FILTER} ]]; then echo "- kind('${BAZEL_NEGATIVE_KIND_FILTER}', \$targets)" >&3 fi