Skip to content

lint: Apply lint only to modified files #365

lint: Apply lint only to modified files

lint: Apply lint only to modified files #365

Workflow file for this run

name: Lint
on:
pull_request_target:
permissions:
pull-requests: write
jobs:
textlint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: modified files
run: |
modified_files=$(git diff --name-only --diff-filter=AM origin/${{ github.base_ref }..origin${{ github.head_ref }} | tr '\n' ' ')
echo "textlint_flags=$modified_files" >> $GITHUB_ENV
- uses: tsuyoshicho/action-textlint@v3
with:
fail_on_error: true