This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (50 loc) · 2.06 KB
/
mega-linter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
name: Lint
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches-ignore:
- PRODUCTION
# more infos on possible types here : https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#pull_request
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
env:
APPLY_FIXES: all # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool)
APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all)
APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request)
jobs:
megalinter:
permissions: write-all
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
# Git Checkout
- name: Checkout Code
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
fetch-depth: 0
# MegaLinter
- name: MegaLinter
id: ml
# You can override MegaLinter flavor used to have faster performances
# More info at https://oxsecurity.github.io/megalinter/flavors/
uses: oxsecurity/megalinter/flavors/javascript@v6.15.0
env:
# All available variables are described in documentation
# https://oxsecurity.github.io/megalinter/configuration/
# Apply linter fixes configuration
VALIDATE_ALL_CODEBASE: false # to change
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload MegaLinter artifacts create dir
- name: Archive production artifacts create dir
if: ${{ failure() }}
run: mkdir -p megalinter-reports/linters_logs/
# Upload MegaLinter artifacts
- name: Archive production artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: MegaLinter reports
path: megalinter-reports/linters_logs/