Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: autofix.ci
on:
pull_request:
push:

permissions:
contents: write
Expand Down Expand Up @@ -30,6 +29,17 @@ jobs:
echo "No files to format"
fi

- uses: autofix-ci/action@v1
with:
commit-message: "Apply Prettier format"
- name: Commit formatted changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

if [ -n "$(git status --porcelain)" ]; then
# Check out the PR branch to avoid detached HEAD
git checkout ${{ github.head_ref }}
git add --all
git commit -m "chore: Apply Prettier formatting"
git push origin ${{ github.head_ref }}
else
echo "No formatting changes to commit"
fi
Loading