|
| 1 | +--- |
| 2 | +name: Feature branch MegaLinter |
| 3 | + |
| 4 | +on: # yamllint disable-line rule:truthy |
| 5 | + pull_request: |
| 6 | + |
| 7 | +concurrency: |
| 8 | + group: ${{ github.ref }}-${{ github.workflow }} |
| 9 | + cancel-in-progress: true |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: write |
| 13 | + issues: write |
| 14 | + pull-requests: write |
| 15 | + |
| 16 | +jobs: |
| 17 | + linter: |
| 18 | + name: MegaLinter |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + # Git Checkout |
| 22 | + - name: Checkout Code |
| 23 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 |
| 24 | + with: |
| 25 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 26 | + fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances |
| 27 | + |
| 28 | + # MegaLinter |
| 29 | + - name: MegaLinter |
| 30 | + id: ml |
| 31 | + # You can override MegaLinter flavor used to have faster performances |
| 32 | + # More info at https://megalinter.io/flavors/ |
| 33 | + uses: oxsecurity/megalinter@f90c800040e4f84800700b27b2394d3eecc1fdad # v8.4.0 |
| 34 | + env: |
| 35 | + # All available variables are described in documentation |
| 36 | + # https://megalinter.io/configuration/ |
| 37 | + VALIDATE_ALL_CODEBASE: false |
| 38 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 39 | + # ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY |
| 40 | + SPELL_CSPELL_FILTER_REGEX_EXCLUDE: (\.gitignore|.tflint.hcl|CHANGELOG.md) |
| 41 | + # needed to avoid multiple error messages |
| 42 | + TERRAFORM_TERRASCAN_ARGUMENTS: "--non-recursive" |
| 43 | + # format issues fail the build |
| 44 | + TERRAFORM_TERRAFORM_FMT_DISABLE_ERRORS: false |
| 45 | + # it's an auto-generated file |
| 46 | + MARKDOWN_MARKDOWNLINT_FILTER_REGEX_EXCLUDE: (CHANGELOG.md) |
| 47 | + # it's an auto-generated file |
| 48 | + MARKDOWN_MARKDOWN_LINK_CHECK_FILTER_REGEX_EXCLUDE: (CHANGELOG.md) |
| 49 | + # automatically commit fixes to the feature branch |
| 50 | + APPLY_FIXES: all |
| 51 | + APPLY_FIXES_EVENT: pull_request |
| 52 | + APPLY_FIXES_MODE: commit |
| 53 | + # Upload MegaLinter artifacts |
| 54 | + - name: Archive production artifacts |
| 55 | + if: ${{ success() || failure() }} |
| 56 | + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 |
| 57 | + with: |
| 58 | + name: MegaLinter reports |
| 59 | + path: | |
| 60 | + megalinter-reports |
| 61 | + mega-linter.log |
| 62 | +
|
0 commit comments