Skip to content

Commit

Permalink
Merge pull request #137 from s3-odara/lint3
Browse files Browse the repository at this point in the history
lint: ワークフローの修正
  • Loading branch information
erechorse authored Dec 4, 2024
2 parents 8cd7fb5 + 82fa14d commit 53b4816
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,22 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
# プルリクエスト元リポジトリからプルリクエスト作成時のプルリクエスト先baseブランチの最新コミットを取得
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.base.sha }}
# プルリクエスト元リポジトリからプルリクエスト用ブランチの最新コミットを取得して上書き
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
# プルリクエスト作成時のプルリクエスト先baseブランチの最新コミットとプルリクエスト先headブランチの最新コミットを比較
- name: modified files
run: |
modified_files=$(git diff --name-only --diff-filter=AM origin/${{ github.base_ref }..origin${{ github.head_ref }} | tr '\n' ' ')
modified_files=$(git diff --name-only --diff-filter=AM ${{ github.event.pull_request.base.sha }}..origin/${{ github.head_ref }} | tr '\n' ' ')
echo "textlint_flags=$modified_files" >> $GITHUB_ENV
- uses: tsuyoshicho/action-textlint@v3
with:
fail_on_error: true
textlint_flags: ${{ env.textlint_flags }}

0 comments on commit 53b4816

Please sign in to comment.