Skip to content

Commit

Permalink
PR時に自動フォーマットするように変更
Browse files Browse the repository at this point in the history
  • Loading branch information
o-tr committed Nov 1, 2024
1 parent 4c27824 commit c6647ae
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/pr_test_format.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: PR Format Check
name: PR Format

on:
pull_request:
branches:
- master
paths:
- "**/*.md"

jobs:
format-check:
Expand All @@ -19,5 +21,16 @@ jobs:
- name: Install dependencies
run: npm install

- name: Run Prettier check
run: npx prettier --check "./**/*.md"
- name: Run Prettier format
run: npx prettier --write "./**/*.md"

- name: Check for changes
id: git_diff
run: |
git diff --exit-code || echo "changes"
- uses: stefanzweifel/[email protected]
if: steps.git_diff.outputs.changes == 'changes'
with:
commit_message: Apply Prettier Change
ref: ${{ github.head_ref }}

0 comments on commit c6647ae

Please sign in to comment.