From c31c5600c8f0a7ace1b571c250dfdb92f3c81622 Mon Sep 17 00:00:00 2001 From: s3-odara Date: Mon, 2 Dec 2024 00:47:22 +0900 Subject: [PATCH 1/2] lint: Apply lint only to modified files --- .github/workflows/lint.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 368e6104..36ed6f81 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,6 +15,10 @@ jobs: 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 "INPUT_TEXTLINT_FLAGS=$modified_files" >> $GITHUB_ENV - uses: tsuyoshicho/action-textlint@v3 with: fail_on_error: true From 929f94fa3b952a8beee4b874eec036c7dad4d291 Mon Sep 17 00:00:00 2001 From: s3-odara Date: Mon, 2 Dec 2024 01:38:51 +0900 Subject: [PATCH 2/2] fix variable name --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 36ed6f81..cb38ae29 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: - name: modified files run: | modified_files=$(git diff --name-only --diff-filter=AM origin/${{ github.base_ref }..origin${{ github.head_ref }} | tr '\n' ' ') - echo "INPUT_TEXTLINT_FLAGS=$modified_files" >> $GITHUB_ENV + echo "textlint_flags=$modified_files" >> $GITHUB_ENV - uses: tsuyoshicho/action-textlint@v3 with: fail_on_error: true