From d8aa1086b1fe9d09cf7f320cd484b1f1fd2c406f Mon Sep 17 00:00:00 2001 From: 7ui77 <99854073+7ui77@users.noreply.github.com> Date: Thu, 16 Jul 2026 15:13:38 +0700 Subject: [PATCH] ci: add lint.yml workflow for PR check (#2253) --- .github/workflows/lint.yml | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..ba3f507 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,51 @@ +name: Lint Check + +on: + pull_request: + branches: [ master ] + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: Lint Check + runs-on: ubuntu-latest + + permissions: + contents: read + pull-requests: write + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Get Changed Files + id: changed-files + uses: tj-actions/changed-files@v45 + + - name: Setup Node.js + if: steps.changed-files.outputs.any_changed == 'true' + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install Dependencies + if: steps.changed-files.outputs.any_changed == 'true' + run: npm ci + + - name: Run ESLint with Reviewdog + if: steps.changed-files.outputs.any_changed == 'true' + uses: reviewdog/action-eslint@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: github-pr-review + eslint_flags: "${{ steps.changed-files.outputs.all_changed_files }}" + filter_mode: diff_context + fail_on_error: false +