cache-domains/.github/workflows/mega-linter.yml
Amir Zarrinkafsh a2a12ae80d
feat: add lefthook, megalinter and update editorconfig
This change adds [LeftHook](https://lefthook.dev/) as a GitHub hook management tool alongside [MegaLinter](https://megalinter.io/) to lint all relevant files within the repository.
2025-07-23 14:13:15 +10:00

58 lines
1.2 KiB
YAML

# MegaLinter GitHub Action configuration file
# More info at https://megalinter.io
---
name: MegaLinter
on:
pull_request:
branches:
- master
env:
APPLY_FIXES: all
APPLY_FIXES_EVENT: pull_request
APPLY_FIXES_MODE: commit
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
megalinter:
name: MegaLinter
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: MegaLinter
uses: oxsecurity/megalinter@v8
id: ml
env:
VALIDATE_ALL_CODEBASE: >-
${{
github.event_name == 'push' &&
github.ref == 'refs/heads/master'
}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive production artifacts
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: MegaLinter reports
include-hidden-files: "true"
path: |
megalinter-reports
mega-linter.log