|
1 | 1 | # MegaLinter GitHub Action configuration file
|
2 | 2 | # More info at https://megalinter.io
|
3 | 3 | ---
|
4 |
| - name: MegaLinter |
| 4 | +name: MegaLinter |
5 | 5 |
|
6 |
| - # Trigger mega-linter at every pull request. |
7 |
| - on: |
8 |
| - pull_request: |
9 |
| - # branches: |
10 |
| - # - main |
11 |
| - # - testing |
12 |
| - # - dev |
13 |
| - # - experimental |
| 6 | +# Trigger mega-linter at every pull request. |
| 7 | +on: |
| 8 | + pull_request: |
| 9 | + # branches: |
| 10 | + # - main |
| 11 | + # - testing |
| 12 | + # push: |
| 13 | + # branches: |
| 14 | + # - main |
| 15 | + # - testing |
| 16 | + # workflow_dispatch: |
14 | 17 |
|
15 |
| - concurrency: |
16 |
| - group: ${{ github.ref }}-${{ github.workflow }} |
17 |
| - cancel-in-progress: true |
| 18 | +concurrency: |
| 19 | + group: ${{ github.ref }}-${{ github.workflow }} |
| 20 | + cancel-in-progress: true |
18 | 21 |
|
19 |
| - jobs: |
20 |
| - megalinter: |
21 |
| - name: MegaLinter |
22 |
| - runs-on: ubuntu-latest |
23 |
| - permissions: |
24 |
| - contents: read |
25 |
| - issues: read |
26 |
| - pull-requests: read |
| 22 | +jobs: |
| 23 | + megalinter: |
| 24 | + name: MegaLinter |
| 25 | + runs-on: ubuntu-latest |
| 26 | + permissions: |
| 27 | + contents: read |
| 28 | + issues: read |
| 29 | + pull-requests: read |
27 | 30 |
|
28 |
| - steps: |
| 31 | + steps: |
29 | 32 |
|
30 |
| - # Git Checkout |
31 |
| - - name: Checkout Code |
32 |
| - uses: actions/checkout@v4 |
33 |
| - with: |
34 |
| - token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} |
| 33 | + # Git Checkout |
| 34 | + - name: Checkout Code |
| 35 | + uses: actions/checkout@v4 |
| 36 | + with: |
| 37 | + token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} |
35 | 38 |
|
36 |
| - # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performance |
37 |
| - # fetch-depth: 0 |
| 39 | + # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performance |
| 40 | + # fetch-depth: 0 |
38 | 41 |
|
39 |
| - # MegaLinter |
40 |
| - - name: MegaLinter |
| 42 | + # MegaLinter |
| 43 | + - name: MegaLinter |
41 | 44 |
|
42 |
| - # You can override MegaLinter flavor used to have faster performances |
43 |
| - # More info at https://megalinter.io/flavors/ |
44 |
| - # The dotnet flavor includes PowerShell, MD, YAML, JSON, spelling, and more. |
45 |
| - uses: oxsecurity/megalinter/flavors/dotnet@v8.3.0 |
| 45 | + # You can override MegaLinter flavor used to have faster performances |
| 46 | + # More info at https://megalinter.io/flavors/ |
| 47 | + # The dotnet flavor includes PowerShell, MD, YAML, JSON, spelling, and more. |
| 48 | + uses: oxsecurity/megalinter/flavors/dotnet@v8.3.0 |
46 | 49 |
|
47 |
| - id: ml |
| 50 | + id: ml |
48 | 51 |
|
49 |
| - # All available variables are described in documentation |
50 |
| - # https://megalinter.io/configuration/ |
51 |
| - env: |
| 52 | + # All available variables are described in documentation |
| 53 | + # https://megalinter.io/configuration/ |
| 54 | + env: |
52 | 55 |
|
53 |
| - # Validates all source when push on main, else just the git diff with |
54 |
| - # main. Override with true if you always want to lint all sources |
55 |
| - # |
56 |
| - # To validate the entire codebase, set to: |
57 |
| - VALIDATE_ALL_CODEBASE: true |
58 |
| - # |
59 |
| - # To validate only diff with main, set to: |
60 |
| - # VALIDATE_ALL_CODEBASE: >- |
61 |
| - # ${{ |
62 |
| - # github.event_name == 'push' && |
63 |
| - # contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref) |
64 |
| - # }} |
65 |
| - # VALIDATE_ALL_CODEBASE: >- |
66 |
| - # ${{ |
67 |
| - # github.event_name == 'push' && |
68 |
| - # contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref) |
69 |
| - # }} |
| 56 | + # Validates all source when push on main, else just the git diff with |
| 57 | + # main. Override with true if you always want to lint all sources |
| 58 | + # |
| 59 | + # To validate the entire codebase, set to: |
| 60 | + VALIDATE_ALL_CODEBASE: true |
| 61 | + # |
| 62 | + # To validate only diff with main, set to: |
| 63 | + # VALIDATE_ALL_CODEBASE: >- |
| 64 | + # ${{ |
| 65 | + # github.event_name == 'push' && |
| 66 | + # contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref) |
| 67 | + # }} |
| 68 | + # VALIDATE_ALL_CODEBASE: >- |
| 69 | + # ${{ |
| 70 | + # github.event_name == 'push' && |
| 71 | + # contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref) |
| 72 | + # }} |
70 | 73 |
|
71 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 74 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
72 | 75 |
|
73 |
| - # ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE |
74 |
| - # .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY |
| 76 | + # ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE |
| 77 | + # .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY |
75 | 78 |
|
76 |
| - # Uncomment to disable copy-paste and spell checks |
77 |
| - # DISABLE: COPYPASTE,SPELL |
78 |
| - DISABLE_ERRORS: true |
79 |
| - DISABLE_LINTERS: EDITORCONFIG_EDITORCONFIG_CHECKER, SPELL_LYCHEE |
80 |
| - # Uncomment DISABLE_ERRORS_LINTERS if you want to turn errors back on selectively. |
81 |
| - # DISABLE_ERRORS_LINTERS: REPOSITORY_DEVSKIM,REPOSITORY_KICS,REPOSITORY_CHECKOV,POWERSHELL_POWERSHELL,SPELL_CSPELL |
| 79 | + # Uncomment to disable copy-paste and spell checks |
| 80 | + # DISABLE: COPYPASTE,SPELL |
| 81 | + DISABLE_ERRORS: true |
| 82 | + DISABLE_LINTERS: EDITORCONFIG_EDITORCONFIG_CHECKER, SPELL_LYCHEE |
| 83 | + # Uncomment DISABLE_ERRORS_LINTERS if you want to turn errors back on selectively. |
| 84 | + # DISABLE_ERRORS_LINTERS: REPOSITORY_DEVSKIM,REPOSITORY_KICS,REPOSITORY_CHECKOV,POWERSHELL_POWERSHELL,SPELL_CSPELL |
82 | 85 |
|
83 |
| - # Upload MegaLinter artifacts |
84 |
| - - name: Archive production artifacts |
85 |
| - uses: actions/upload-artifact@v4 |
86 |
| - if: success() || failure() |
87 |
| - with: |
88 |
| - name: MegaLinter reports |
89 |
| - path: | |
90 |
| - megalinter-reports |
91 |
| - mega-linter.log |
| 86 | + # Upload MegaLinter artifacts |
| 87 | + - name: Archive production artifacts |
| 88 | + uses: actions/upload-artifact@v4 |
| 89 | + if: success() || failure() |
| 90 | + with: |
| 91 | + name: MegaLinter reports |
| 92 | + path: | |
| 93 | + megalinter-reports |
| 94 | + mega-linter.log |
0 commit comments