mirror of
https://github.com/scifijunk/cache-domains.git
synced 2026-02-04 00:21:01 -06:00
feat: add lefthook, megalinter and update editorconfig (#270)
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. For users that don't end up installing LeftHook for pre-commit hooks, megalinter picks up the necessary formatting changes and reports them. * feat: add lefthook, megalinter and update editorconfig * fix: lint commit ordering * refactor: adjust megalinter reporters * refactor: adjust description for cache domains * refactor: single - for passing options * refactor: add repo-specific fmt in megalinter pre-commands too
This commit is contained in:
55
.github/workflows/mega-linter.yml
vendored
Normal file
55
.github/workflows/mega-linter.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
# MegaLinter GitHub Action configuration file
|
||||
# More info at https://megalinter.io
|
||||
---
|
||||
name: MegaLinter
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
GITHUB_STATUS_REPORTER: true
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user