ci(pre-commit): update pre-commit hooks #138
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: MegaLinter | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
skip-duplicate: | |
name: Skip Duplicate | |
permissions: | |
actions: write | |
runs-on: ubuntu-latest | |
outputs: | |
should-skip: ${{ steps.skip-duplicate.outputs.should-skip }} | |
steps: | |
- id: skip-duplicate | |
name: Skip Duplicate | |
uses: liblaf/actions/skip-duplicate@dist | |
with: | |
cancel-others: true | |
mega-linter: | |
name: MegaLinter | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
needs: | |
- skip-duplicate | |
if: needs.skip-duplicate.outputs.should-skip != 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
with: | |
ref: ${{ github.head_ref || github.ref }} | |
- id: lint | |
name: MegaLinter | |
uses: liblaf/actions/mega-linter@dist | |
- if: success() || failure() | |
name: Upload Reports | |
uses: actions/upload-artifact@v4 | |
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' | |
- if: steps.lint.outputs.has-updated-sources > 0 && github.ref == 'refs/heads/main' | |
name: Create PR with Applied Fixes | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
commit-message: "chore(mega-linter): apply linters automatic fixes" | |
branch: mega-linter-fix/${{ github.ref_name }} | |
sign-commits: true | |
title: "chore(mega-linter): apply linters automatic fixes" | |
body-path: ${{ runner.temp }}/megalinter-report.md | |
labels: |- | |
autofix | |
automerge | |
assignees: ${{ github.repository_owner }} | |
reviewers: ${{ github.repository_owner }} | |
- if: steps.lint.outputs.has-updated-sources > 0 && github.ref != 'refs/heads/main' | |
name: Commit and Push Applied Linter Fixes | |
uses: liblaf/actions/commit@dist | |
with: | |
add-options: --verbose --update | |
message: "chore(mega-linter): apply linters automatic fixes" |