Skip to content

ci(ml): implement final MegaLinter config #1

ci(ml): implement final MegaLinter config

ci(ml): implement final MegaLinter config #1

Workflow file for this run

# MegaLinter GitHub Action configuration file
# More info at https://megalinter.io
name: '✏️ MegaLinter'
permissions:
contents: read
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
# Comment env block if you do not want to apply fixes
env:
MAIN_BRANCH: ${{ github.event_name == 'push' }}
# Apply linter fixes configuration
APPLY_FIXES: all
# Decide which event triggers application of fixes in a commit or a PR
APPLY_FIXES_EVENT: pull_request, push
# If APPLY_FIXES is used, defines if the fixes are directly committed (commit)
# or posted in a PR (pull_request)
APPLY_FIXES_MODE: commit
jobs:
megalinter:
name: MegaLinter
runs-on: ubuntu-latest
steps:
- if: ${{ env.MAIN_BRANCH }}
uses: actions/checkout@v4
- if: ${{ env.MAIN_BRANCH == 0 }}
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout repository
uses: actions/checkout@v4
# MegaLinter
- name: Run MegaLinter
id: ml
uses: oxsecurity/megalinter/flavors/documentation@v7.13.0
env:
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISABLE: COPYPASTE,SPELL,HTML
DISABLE_LINTERS: REPOSITORY_GITLEAKS,CSS_SCSS_LINT,BASH_SHELLCHECK,JSON_JSONLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_GIT_DIFF,YAML_V8R,MARKDOWN_MARKDOWNLINT_NO_TRAILING_SPACES,MARKDOWN_MARKDOWNLINT_NO_DUPLICATE_HEADING
DISABLE_ERRORS_LINTERS: CSS_STYLELINT,MARKDOWN_MARKDOWN_LINK_CHECK,YAML_YAMLLINT,DOCKERFILE_HADOLINT,REPOSITORY_TRIVY,REPOSITORY_CHECKOV,REPOSITORY_GITLEAKS
MARKDOWN_MARKDOWNLINT_FILTER_REGEX_EXCLUDE: '(export/|briar\.md|donations\.md|LICENSE\.md)'
# Upload MegaLinter artifacts
- name: Archive MegaLinter reports
uses: actions/upload-artifact@v4
if: always() # Ensure artifacts are always uploaded
with:
name: MegaLinter reports
path: |
megalinter-reports
mega-linter.log