Skip to content

fmtの記事

fmtの記事 #34

Workflow file for this run

name: "日本語のlintをかける"
on:
pull_request:
paths:
- contents/*.md
- README.md
jobs:
textlint:
runs-on: ubuntu-latest
steps:
- name: "checkoutする"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "fetchする"
run: git fetch
- name: "corepackの有効化"
run: corepack enable
- name: "Node.jsのセットアップ"
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: "reviewdogのインストール"
uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: "パッケージのインストール"
run: pnpm install
- name: "textlintの実行 with reviewdog"
run: |
npx textlint -f checkstyle $(git diff --name-only origin/main HEAD | grep -E '\.md$' | sed -z "s/\n/ /g") | reviewdog -f checkstyle --name=textlint -reporter=github-pr-review
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}