File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change 1
1
name : MegaLinter
2
2
3
+ env :
4
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5
+ APPLY_FIXES : all
6
+ APPLY_FIXES_EVENT : commit
7
+ APPLY_FIXES_MODE : commit
8
+
3
9
on :
4
10
push :
5
11
@@ -16,17 +22,14 @@ jobs:
16
22
uses : actions/checkout@v4
17
23
18
24
- name : Run Mega-Linter
25
+ id : megalinter
19
26
uses : oxsecurity/megalinter@v8
20
- env :
21
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
22
- APPLY_FIXES : all
23
- APPLY_FIXES_EVENT : all
24
- APPLY_FIXES_MODE : commit
25
27
26
- - name : Commit and push fixes
27
- run : |
28
- git config user.name "GitHub Action"
29
- git config user.email "action@github.com"
30
- git add .
31
- git commit -m "[MegaLinter] Apply linters fixes [skip ci]" || echo "No changes to commit"
32
- git push origin HEAD:${{ github.head_ref || github.ref_name }}
28
+ - name : Commit and push applied linter fixes
29
+ if : steps.megalinter.outputs.has_updated_sources == 1
30
+ uses : stefanzweifel/git-auto-commit-action@v4
31
+ with :
32
+ branch : ${{ github.head_ref || github.ref }}
33
+ commit_message : " [MegaLinter] Apply linters fixes"
34
+ commit_user_name : megalinter-bot
35
+ commit_user_email : nicolas.vuillamy@ox.security
You can’t perform that action at this time.
0 commit comments