chore: replace reviewdog with eslint with sarif

This commit is contained in:
TonyRL
2023-02-15 11:43:58 +00:00
committed by Tony
parent c47b29c509
commit d226cfcd7a
3 changed files with 50 additions and 20 deletions
+28 -19
View File
@@ -3,7 +3,22 @@ name: Linter
on: [push, pull_request, pull_request_target]
jobs:
linter:
eslint:
name: ESLint
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- run: yarn
- name: Lint
run: yarn lint
eslint-warning:
name: Lint
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
@@ -17,22 +32,15 @@ jobs:
- run: yarn
- name: Lint
run: yarn lint
reviewdog:
name: reviewdog
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
--format @microsoft/eslint-formatter-sarif
--output-file eslint-results.sarif
continue-on-error: true
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v2
with:
node-version: 18
cache: 'yarn'
- run: yarn
- name: Lint
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
sarif_file: eslint-results.sarif
wait-for-processing: true
titleLint:
if: ${{ github.event_name == 'pull_request_target' }}
name: Validate PR title
@@ -45,6 +53,7 @@ jobs:
ignoreLabels: |
dependencies
wip: true
labeler:
name: Pull Request Labeler
if: ${{ github.event_name == 'pull_request_target' }}
@@ -54,6 +63,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/labeler@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/labeler@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}