feat(ci): use pr-lint action instead of reviewdog (#136)

This commit is contained in:
2025-06-30 03:21:47 +03:00
committed by GitHub
parent 15aff17f03
commit 1531647e01
8 changed files with 59 additions and 54 deletions

View File

@@ -1,5 +1,5 @@
---
# yaml-language-server: https://json.schemastore.org/github-workflow.json
# $schema: "https://json.schemastore.org/github-workflow.json"
name: Debug Changelog # Workflow name displayed on GitHub
on:

View File

@@ -1,8 +1,10 @@
---
# yaml-language-server: https://json.schemastore.org/github-workflow.json
name: Reviewdog
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Lint Code Base
on: [push]
on:
pull_request:
branches: [master, main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -11,50 +13,24 @@ concurrency:
permissions: read-all
jobs:
linters:
name: Linters
runs-on: self-hosted
permissions: write-all
Linter:
name: PR Lint
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
statuses: write
contents: read
packages: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node.js environment
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
- name: GitHub Actions
uses: reviewdog/action-actionlint@a5524e1c19e62881d79c1f1b9b6f09f16356e281 # v1.65.2
- name: Yarn Lock Changes
uses: Simek/yarn-lock-changes@34017425198654c20162a4dfd4f238fbece9636f # v0.12.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
token: ${{ secrets.GITHUB_TOKEN }}
- name: detect-secrets
uses: reviewdog/action-detect-secrets@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
- name: markdownlint
uses: reviewdog/action-markdownlint@3667398db9118d7e78f7a63d10e26ce454ba5f58 # v0.26.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
- name: shfmt
uses: reviewdog/action-shfmt@d8f080930b9be5847b4f97e9f4122b81a82aaeac # v1.0.4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
shfmt_flags: |
--find
--list
--write
--diff
--simplify
--language-dialect bash
--indent 2
--binary-next-line
--case-indent
--space-redirects
--func-next-line
- name: Run PR Lint
# https://github.com/ivuorinen/actions
uses: ivuorinen/actions/pr-lint@9480614ba2231013d99dd5b9c730d2b105b9e160 # 25.6.25

View File

@@ -1,5 +1,5 @@
---
# yaml-language-server: https://json.schemastore.org/github-workflow.json
# $schema: "https://json.schemastore.org/github-workflow.json"
name: Release Daily State
on:

View File

@@ -1,5 +1,5 @@
---
# yaml-language-server: https://json.schemastore.org/github-workflow.json
# $schema: "https://json.schemastore.org/github-workflow.json"
name: Pre-commit autoupdate
on:
@@ -16,7 +16,7 @@ permissions: read-all
jobs:
auto-update:
runs-on: ubuntu-latest
runs-on: self-hosted
permissions:
contents: write

View File

@@ -1,5 +1,5 @@
---
# yaml-language-server: https://json.schemastore.org/github-workflow.json
# $schema: "https://json.schemastore.org/github-workflow.json"
name: Semantic PR
on:

View File

@@ -1,5 +1,5 @@
---
# yaml-language-server: https://json.schemastore.org/github-workflow.json
# $schema: "https://json.schemastore.org/github-workflow.json"
name: Sync labels
# yamllint disable-line rule:truthy
@@ -23,10 +23,10 @@ permissions: read-all
jobs:
SyncLabels:
runs-on: ubuntu-latest
runs-on: self-hosted
permissions:
issues: write
steps:
- uses: ivuorinen/actions/sync-labels@main
- uses: ivuorinen/actions/sync-labels@99f3911475dbb5b8d43d314b24c0882997433868 # 25.6.23

View File

@@ -1,5 +1,5 @@
---
# yaml-language-server: https://json.schemastore.org/github-workflow.json
# $schema: "https://json.schemastore.org/github-workflow.json"
name: Update submodules
on:

29
.mega-linter.yml Normal file
View File

@@ -0,0 +1,29 @@
---
# Configuration file for MegaLinter
# See all available variables at
# https://megalinter.io/configuration/ and in linters documentation
APPLY_FIXES: all
SHOW_ELAPSED_TIME: false # Show elapsed time at the end of MegaLinter run
PARALLEL: true
VALIDATE_ALL_CODEBASE: true
FILEIO_REPORTER: false # Generate file.io report
GITHUB_STATUS_REPORTER: true # Generate GitHub status report
IGNORE_GENERATED_FILES: true # Ignore generated files
JAVASCRIPT_DEFAULT_STYLE: prettier # Default style for JavaScript
PRINT_ALPACA: false # Print Alpaca logo in console
SARIF_REPORTER: true # Generate SARIF report
SHOW_SKIPPED_LINTERS: false # Show skipped linters in MegaLinter log
TYPESCRIPT_DEFAULT_STYLE: prettier # Default style for TypeScript
DISABLE_LINTERS:
- REPOSITORY_DEVSKIM
YAML_YAMLLINT_CONFIG_FILE: .yamllint.yml
MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .markdownlint.json
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.json
TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.json
FILTER_REGEX_EXCLUDE: >
(node_modules|tools|config/cheat/cheatsheets/community|config/cheat/cheatsheets/tldr|config/fzf|config/zsh|config/tmux/plugins)