From 1a74eafa11f90fcb62433441a2bfd1e2b1da4875 Mon Sep 17 00:00:00 2001 From: Piyush Raj Date: Sun, 13 Aug 2023 18:47:21 +0530 Subject: [PATCH 1/2] add super-linter to workflow Signed-off-by: Piyush Raj --- .github/workflows/linter.yml | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 00000000..0bc998e3 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,46 @@ +name: Lint Code Base + +on: + pull_request: + push: + branches: + - main + + +jobs: + build: + name: Lint Code Base + runs-on: ubuntu-latest + + ############################################ + # Grant status permission for MULTI_STATUS # + ############################################ + permissions: + contents: read + packages: read + statuses: write + + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + 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: super-linter/super-linter/slim@v5 + env: + VALIDATE_ALL_CODEBASE: true + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # add the linters to be run + VALIDATE_TERRAFORM_TFLINT: true + VALIDATE_YAML: True + # VALIDATE_DOCKERFILE_HADOLINT: true + VALIDATE_GITLEAKS: true + VALIDATE_JAVASCRIPT_ES: true + VALIDATE_SQL: true + VALIDATE_GITHUB_ACTIONS: true \ No newline at end of file From 9f178793e015e79ad94e0d288770cd992d366b24 Mon Sep 17 00:00:00 2001 From: Piyush Raj Date: Tue, 15 Aug 2023 14:41:40 +0530 Subject: [PATCH 2/2] disable full codebase validation --- .github/workflows/linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 0bc998e3..a5c90785 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -33,7 +33,7 @@ jobs: - name: Lint Code Base uses: super-linter/super-linter/slim@v5 env: - VALIDATE_ALL_CODEBASE: true + VALIDATE_ALL_CODEBASE: false DEFAULT_BRANCH: main GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # add the linters to be run