diff --git a/.github/linters/.hadolint.yaml b/.github/linters/.hadolint.yaml new file mode 100644 index 000000000..f8cbb9da2 --- /dev/null +++ b/.github/linters/.hadolint.yaml @@ -0,0 +1 @@ +failure-threshold: error diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 000000000..e48bd7f98 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,31 @@ +name: Lint Code Base + +on: + pull_request: null + +permissions: {} + +jobs: + run-lint: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: read + # To report GitHub Actions status checks + statuses: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + - name: Lint Code Base + uses: github/super-linter@v6 # https://github.com/github/super-linter + env: + DEFAULT_BRANCH: main + FILTER_REGEX_EXCLUDE: eng/common/.* + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VALIDATE_DOCKERFILE_HADOLINT: true + VALIDATE_MARKDOWN: true