diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml new file mode 100644 index 0000000..0194c39 --- /dev/null +++ b/.github/workflows/mega-linter.yml @@ -0,0 +1,49 @@ +--- +# MegaLinter GitHub Action configuration +# https://megalinter.io +name: MegaLinter + +on: + push: + branches: [main, master, dev, staging] + pull_request: + branches: [main, master, dev, staging] + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +permissions: read-all + +jobs: + megalinter: + name: MegaLinter + runs-on: ubuntu-latest + permissions: + contents: read + issues: write + pull-requests: write + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: MegaLinter + id: ml + # python will be replaced by the script + uses: oxsecurity/megalinter/flavors/python@v9 + env: + VALIDATE_ALL_CODEBASE: false + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Disable linters that are too noisy for most projects + DISABLE_LINTERS: SPELL_CSPELL,COPYPASTE_JSCPD,REPOSITORY_TRIVY,REPOSITORY_CHECKOV,REPOSITORY_GRYPE + + - name: Archive lint reports + if: success() || failure() + uses: actions/upload-artifact@v4 + with: + name: MegaLinter-reports + path: | + megalinter-reports + retention-days: 7