File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 pull_request :
88 branches : [main, master]
99
10+ # Elevating permissions to allow PR comments and automated fixing commits
1011permissions :
11- contents : read
12+ contents : write
1213 statuses : write
14+ pull_requests : write
1315
1416jobs :
1517 megalinter :
1618 name : MegaLinter
1719 runs-on : ubuntu-latest
1820 steps :
21+ # Git Checkout
1922 - name : Checkout Code
2023 uses : actions/checkout@v4
2124 with :
2225 token : ${{ secrets.GITHUB_TOKEN }}
2326 fetch-depth : 0
2427
28+ # MegaLinter Execution
2529 - name : Run MegaLinter
2630 uses : oxsecurity/megalinter@v7
2731 env :
2832 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2933 VALIDATE_ALL_CODEBASE : false
34+ # Enables individual linter engines to fix errors locally in the runner
35+ APPLY_FIXES : all
36+ APPLY_FIXES_EVENT : all
37+
38+ # Push automated fixes back to your repository branch
39+ - name : Commit Automated Fixes
40+ if : success() || failure()
41+ uses : stefanzweifel/git-auto-commit-action@v5
42+ with :
43+ branch : ${{ github.head_ref || github.ref_name }}
44+ commit_message : " chore: automated code formatting fixes by MegaLinter"
45+ commit_user_name : megalinter-bot
46+ commit_user_email : megalinter-bot@ox.security
47+
48+ # Upload the visual HTML dashboards and asset logs
49+ - name : Upload MegaLinter Reports
50+ if : success() || failure()
51+ uses : actions/upload-artifact@v4
52+ with :
53+ name : MegaLinter-reports
54+ path : |
55+ megalinter-reports
56+ mega-linter.log
You can’t perform that action at this time.
0 commit comments