add regex exclude

This commit is contained in:
Bret Fisher
2022-01-16 15:37:53 -05:00
parent 7467ef7790
commit 2b40109493

View File

@@ -33,6 +33,10 @@ on:
required: false required: false
type: boolean type: boolean
default: false default: false
filter-regex-exclude:
description: A regex to exclude files from linting
required: false
type: string
permissions: permissions:
@@ -92,6 +96,15 @@ jobs:
run: | run: |
echo VALIDATE_ALL_CODEBASE=${{ !contains(github.event_name, 'pull_request') }} echo VALIDATE_ALL_CODEBASE=${{ !contains(github.event_name, 'pull_request') }}
# customize excluded paths and files with regex
- name: FILTER_REGEX_EXCLUDE
if: ${{ inputs.filter-regex-exclude }}
run: |
# shellcheck disable=2086
{
echo "FILTER_REGEX_EXCLUDE=${{ inputs.filter-regex-exclude }}" >> $GITHUB_ENV
}
# disable non-DevOps focused linters that might run on sample code or 3rd party code # disable non-DevOps focused linters that might run on sample code or 3rd party code
# these env's will get pass to the next step # these env's will get pass to the next step
- name: Disable non-DevOps linters - name: Disable non-DevOps linters