@@ -8,73 +8,13 @@ name: MegaLinter
88
99on :
1010 push :
11- pull_request :
1211 workflow_dispatch :
1312
1413jobs :
15- skip-duplicate :
16- name : Skip Duplicate
17- permissions :
18- actions : write
19- runs-on : ubuntu-latest
20- outputs :
21- should-skip : ${{ steps.skip-duplicate.outputs.should-skip }}
22- steps :
23- - id : skip-duplicate
24- name : Skip Duplicate
25- uses : liblaf/actions/skip-duplicate@dist
26- with :
27- cancel-others : true
28-
2914 mega-linter :
30- name : MegaLinter
15+ name : M
3116 permissions :
3217 contents : write
33- issues : write
3418 pull-requests : write
35- needs :
36- - skip-duplicate
37- if : needs.skip-duplicate.outputs.should-skip != 'true'
38- runs-on : ubuntu-latest
39- steps :
40- - name : Checkout
41- uses : actions/checkout@v5
42- with :
43- ref : ${{ github.head_ref || github.ref }}
44- - id : lint
45- name : MegaLinter
46- uses : liblaf/actions/mega-linter@dist
47- - if : success() || failure()
48- name : Upload Reports
49- uses : actions/upload-artifact@v4
50- with :
51- name : mega-linter-reports
52- path : |-
53- mega-linter.log
54- megalinter-reports
55- include-hidden-files : true
56- - if : success() || failure()
57- name : Remove MegaLinter Reports
58- run : |-
59- cp --target-directory='${{ runner.temp }}' --verbose 'megalinter-reports/megalinter-report.md'
60- sudo rm --force --recursive 'mega-linter.log' 'megalinter-reports'
61- - if : steps.lint.outputs.has-updated-sources > 0 && github.ref == 'refs/heads/main'
62- name : Create PR with Applied Fixes
63- uses : peter-evans/create-pull-request@v7
64- with :
65- commit-message : " chore(mega-linter): apply linters automatic fixes"
66- branch : mega-linter-fix/${{ github.ref_name }}
67- sign-commits : true
68- title : " chore(mega-linter): apply linters automatic fixes"
69- body-path : ${{ runner.temp }}/megalinter-report.md
70- labels : |-
71- autofix
72- automerge
73- assignees : ${{ github.repository_owner }}
74- reviewers : ${{ github.repository_owner }}
75- - if : steps.lint.outputs.has-updated-sources > 0 && github.ref != 'refs/heads/main'
76- name : Commit and Push Applied Linter Fixes
77- uses : liblaf/actions/commit@dist
78- with :
79- add-options : --verbose --update
80- message : " chore(mega-linter): apply linters automatic fixes"
19+ uses : liblaf/copier-shared/.github/workflows/callable-mega-linter.yaml@main
20+ secrets : inherit
0 commit comments