Skip to content

Commit

Permalink
Update run-textlint.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
himagone authored Dec 9, 2024
1 parent 0bb6102 commit 3f6186f
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions .github/workflows/run-textlint.yml
Original file line number Diff line number Diff line change
@@ -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: "."

0 comments on commit 3f6186f

Please sign in to comment.