|
12 | 12 |
|
13 | 13 | jobs: |
14 | 14 | mega-linter: |
15 | | - name: M |
| 15 | + name: MegaLinter |
16 | 16 | permissions: |
17 | 17 | contents: write |
18 | 18 | pull-requests: write |
19 | | - uses: liblaf/copier-shared/.github/workflows/callable-mega-linter.yaml@main |
20 | | - secrets: inherit |
| 19 | + environment: |
| 20 | + name: MegaLinter |
| 21 | + runs-on: ubuntu-latest |
| 22 | + steps: |
| 23 | + - id: auth |
| 24 | + name: Auth |
| 25 | + uses: liblaf/actions/auth@dist |
| 26 | + with: |
| 27 | + app-id: ${{ vars.APP_ID }} |
| 28 | + private-key: ${{ secrets.PRIVATE_KEY }} |
| 29 | + - name: Checkout |
| 30 | + uses: actions/checkout@v5 |
| 31 | + - id: lint |
| 32 | + name: MegaLinter |
| 33 | + uses: liblaf/actions/mega-linter@dist |
| 34 | + with: |
| 35 | + token: ${{ steps.auth.outputs.token }} |
| 36 | + - if: success() || failure() |
| 37 | + name: Upload Reports |
| 38 | + uses: actions/upload-artifact@v5 |
| 39 | + with: |
| 40 | + name: mega-linter-reports |
| 41 | + path: |- |
| 42 | + mega-linter.log |
| 43 | + megalinter-reports |
| 44 | + include-hidden-files: true |
| 45 | + - if: success() || failure() |
| 46 | + name: Remove MegaLinter Reports |
| 47 | + run: |- |
| 48 | + cp --target-directory='${{ runner.temp }}' --verbose 'megalinter-reports/megalinter-report.md' |
| 49 | + sudo rm --force --recursive 'mega-linter.log' 'megalinter-reports' |
| 50 | + - if: steps.lint.outputs.has-updated-sources > 0 && github.ref == 'refs/heads/main' |
| 51 | + name: Create PR with Applied Fixes |
| 52 | + uses: peter-evans/create-pull-request@v7 |
| 53 | + with: |
| 54 | + commit-message: "chore(mega-linter): apply linters automatic fixes" |
| 55 | + branch: mega-linter-fix/${{ github.ref_name }} |
| 56 | + sign-commits: true |
| 57 | + title: "chore(mega-linter): apply linters automatic fixes" |
| 58 | + body-path: ${{ runner.temp }}/megalinter-report.md |
| 59 | + labels: auto,automerge |
| 60 | + assignees: ${{ github.repository_owner }} |
| 61 | + reviewers: ${{ github.repository_owner }} |
| 62 | + - if: steps.lint.outputs.has-updated-sources > 0 && github.ref != 'refs/heads/main' |
| 63 | + name: Commit and Push Applied Linter Fixes |
| 64 | + uses: liblaf/actions/commit@dist |
| 65 | + with: |
| 66 | + add-options: --verbose --update |
| 67 | + message: "chore(mega-linter): apply linters automatic fixes" |
0 commit comments