build(template): replace Nox recipe helpers with native sessions #340
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This file is @generated by <https://github.com/liblaf/copier-shared>. | |
| # DO NOT EDIT! | |
| # ref: <https://github.com/oxsecurity/megalinter/blob/main/mega-linter-runner/generators/mega-linter/templates/mega-linter.yml> | |
| # ref: <https://megalinter.io> | |
| name: Shared / MegaLinter | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| FORCE_COLOR: 1 | |
| jobs: | |
| mega-linter: | |
| name: MegaLinter | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: mega-linter | |
| deployment: false | |
| outputs: | |
| pull-request-url: ${{ steps.pr.outputs.pull-request-url }} | |
| steps: | |
| - id: auth | |
| name: Auth | |
| uses: liblaf/actions/auth@2d37965c7d54a87b668ea9eba3ee0d7a0a6cc8b1 # v3 | |
| with: | |
| client-id: ${{ vars.APP_CLIENT_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - id: lint | |
| name: MegaLinter | |
| uses: liblaf/megalinter-custom-flavor-all@aaf0f856b3e0ce5562356563690daec53783f5c2 # v10.0.0 | |
| env: | |
| GITHUB_TOKEN: ${{ steps.auth.outputs.token }} | |
| MEGALINTER_CONFIG: https://raw.githubusercontent.com/liblaf/megalinter-custom-flavor-all/refs/heads/main/.mega-linter.yml | |
| - if: success() || failure() | |
| name: Upload reports | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: mega-linter-reports | |
| path: |- | |
| mega-linter.log | |
| megalinter-reports | |
| include-hidden-files: true | |
| - if: success() || failure() | |
| name: Remove MegaLinter reports | |
| run: |- | |
| cp --target-directory='${{ runner.temp }}' --verbose 'megalinter-reports/megalinter-report.md' | |
| sudo rm --force --recursive 'mega-linter.log' 'megalinter-reports' | |
| - id: pr | |
| if: steps.lint.outputs.has-updated-sources == 1 && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) | |
| name: Create PR | |
| uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8 | |
| with: | |
| token: ${{ steps.auth.outputs.token }} | |
| commit-message: "chore(mega-linter): apply linters automatic fixes" | |
| branch: mega-linter/${{ github.head_ref || github.ref_name }} | |
| delete-branch: true | |
| sign-commits: true | |
| title: "chore(mega-linter): apply linters automatic fixes" | |
| body-path: ${{ runner.temp }}/megalinter-report.md | |
| labels: |- | |
| automerge | |
| mega-linter | |
| assignees: ${{ github.repository_owner }} | |
| approve: | |
| name: Approve | |
| permissions: | |
| pull-requests: write | |
| needs: | |
| - mega-linter | |
| if: needs.mega-linter.outputs.pull-request-url | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: approve | |
| deployment: false | |
| steps: | |
| - id: auth | |
| name: Auth | |
| uses: liblaf/actions/auth@2d37965c7d54a87b668ea9eba3ee0d7a0a6cc8b1 # v3 | |
| with: | |
| client-id: ${{ vars.APP_CLIENT_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - name: Approve | |
| uses: liblaf/actions/approve@2d37965c7d54a87b668ea9eba3ee0d7a0a6cc8b1 # v3 | |
| with: | |
| approve-token: ${{ steps.auth.outputs.token }} | |
| pull: ${{ needs.mega-linter.outputs.pull-request-url }} | |
| reviewer: ${{ steps.auth.outputs.committer-name }} |