From 3f6186fc17ee43ecfd2ad10b8540c452929d519c Mon Sep 17 00:00:00 2001 From: himagone <157209079+himagone@users.noreply.github.com> Date: Tue, 10 Dec 2024 08:44:10 +0900 Subject: [PATCH] Update run-textlint.yml --- .github/workflows/run-textlint.yml | 39 ++++++++++++++++-------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/run-textlint.yml b/.github/workflows/run-textlint.yml index 97f3e67..3aa6cfd 100644 --- a/.github/workflows/run-textlint.yml +++ b/.github/workflows/run-textlint.yml @@ -1,24 +1,27 @@ name: run-textlint -on: - pull_request_target: - types: [opened, synchronize] - paths: ['docs/**/*.md'] +on: [pull_request] jobs: - run-textlint: + textlint: + name: runner / textlint runs-on: ubuntu-latest - permissions: - pull-requests: write steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v3 with: - ref: ${{ github.event.pull_request.head.sha }} - - uses: actions/setup-node@v4 + submodules: true + - name: Setup Node/npm + uses: actions/setup-node@v3 with: - node-version: 20 - - run: npm install - - run: npx textlint ./docs/**/*.md || true - - if: ${{ failure() }} - run: gh pr comment --body-file ./.textlint.log "${URL}" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - URL: ${{ github.event.pull_request.html_url }} + node-version: 18 + - name: textlint-github-check + uses: tsuyoshicho/action-textlint@v3 + with: + github_token: ${{ secrets.github_token }} + reporter: github-check + textlint_flags: "." + - name: textlint-github-pr-review + uses: tsuyoshicho/action-textlint@v3 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + textlint_flags: "."