66
77name : MegaLinter
88
9- run-name : ${{ github.workflow }} @ ${{ github.ref }}
10-
119on :
1210 push :
13- branches-ignore :
14- - assets**
15- - dist**
16- - gh-pages
1711 pull_request :
1812 workflow_dispatch :
1913
20- concurrency :
21- group : ${{ github.workflow }} @ ${{ github.ref }}
22- cancel-in-progress : true
23-
2414jobs :
25- pre :
26- name : Pre
15+ skip-duplicate :
16+ name : Skip Duplicate
2717 permissions :
2818 actions : write
2919 runs-on : ubuntu-latest
3020 outputs :
31- should-skip : ${{ steps.pre .outputs.should-skip }}
21+ should-skip : ${{ steps.skip-duplicate .outputs.should-skip }}
3222 steps :
33- - id : pre
34- name : Skip Duplicate Actions
35- uses : liblaf/actions-ts/pre @dist
23+ - id : skip-duplicate
24+ name : Skip Duplicate
25+ uses : liblaf/actions/skip-duplicate @dist
3626 with :
3727 cancel-others : true
3828
@@ -43,51 +33,36 @@ jobs:
4333 issues : write
4434 pull-requests : write
4535 needs :
46- - pre
47- if : needs.pre .outputs.should-skip != 'true'
36+ - skip-duplicate
37+ if : needs.skip-duplicate .outputs.should-skip != 'true'
4838 runs-on : ubuntu-latest
4939 steps :
50- - id : auth
51- name : Authenticate
52- uses : liblaf/actions-ts/authenticate@dist
53- with :
54- app-id : ${{ secrets.GH_APP_ID }}
55- private-key : ${{ secrets.GH_APP_PRIVATE_KEY }}
5640 - name : Checkout
5741 uses : actions/checkout@v5
5842 with :
5943 ref : ${{ github.head_ref || github.ref }}
60- token : ${{ steps.auth.outputs.token }}
6144 - id : lint
6245 name : MegaLinter
63- uses : liblaf/actions-ts/mega-linter@dist
64- with :
65- token : ${{ steps.auth.outputs.token }}
46+ uses : liblaf/actions/mega-linter@dist
6647 - if : success() || failure()
6748 name : Upload Reports
6849 uses : actions/upload-artifact@v4
6950 with :
7051 name : mega-linter-reports
7152 path : |-
7253 mega-linter.log
73- megalinter-reports/
54+ megalinter-reports
7455 include-hidden-files : true
75- - if : success() || failure()
76- name : Add Job Summary
77- run : cat 'megalinter-reports/megalinter-report.md' >> "$GITHUB_STEP_SUMMARY"
7856 - if : success() || failure()
7957 name : Remove MegaLinter Reports
8058 run : |-
81- cp --archive -- target-directory='${{ runner.temp }}' --verbose 'megalinter-reports/megalinter-report.md'
82- sudo rm --force --recursive 'mega-linter.log' 'megalinter-reports/ '
83- - if : github.ref == 'refs/heads/main' && steps.lint.outputs.has-updated-sources > 0
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'
8462 name : Create PR with Applied Fixes
8563 uses : peter-evans/create-pull-request@v7
8664 with :
87- token : ${{ steps.auth.outputs.token }}
8865 commit-message : " chore(mega-linter): apply linters automatic fixes"
89- committer : ${{ steps.auth.outputs.committer }}
90- author : ${{ steps.auth.outputs.author }}
9166 branch : mega-linter-fix/${{ github.ref_name }}
9267 sign-commits : true
9368 title : " chore(mega-linter): apply linters automatic fixes"
9772 automerge
9873 assignees : ${{ github.repository_owner }}
9974 reviewers : ${{ github.repository_owner }}
100- - if : github.ref != 'refs/heads/main' && steps.lint.outputs.has-updated-sources > 0
75+ - if : steps.lint.outputs.has-updated-sources > 0 && github.ref != 'refs/heads/main'
10176 name : Commit and Push Applied Linter Fixes
102- uses : liblaf/actions-ts /commit@dist
77+ uses : liblaf/actions/commit@dist
10378 with :
10479 add-options : --verbose --update
10580 message : " chore(mega-linter): apply linters automatic fixes"
106- token : ${{ steps.auth.outputs.token }}
0 commit comments