-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 1 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
name: MegaLinter
on:
pull_request:
branches:
- main
jobs:
megalinter:
name: MegaLinter
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Mega-Linter
uses: oxsecurity/megalinter@v8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLY_FIXES: all
APPLY_FIXES_EVENT: all
APPLY_FIXES_MODE: commit
- name: Commit and push fixes
run: |
git config user.name "GitHub Action"
git config user.email "action@github.com"
git add .
git commit -m "[MegaLinter] Apply linters fixes [skip ci]" || echo "No changes to commit"
git push origin HEAD:${{ github.head_ref || github.ref_name }}