We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0f48e59 + 244cb4d commit 3c5d811Copy full SHA for 3c5d811
.github/workflows/prettier.yml
@@ -1,7 +1,6 @@
1
name: autofix.ci
2
on:
3
pull_request:
4
- push:
5
6
permissions:
7
contents: write
@@ -30,6 +29,17 @@ jobs:
30
29
echo "No files to format"
31
fi
32
33
- - uses: autofix-ci/action@v1
34
- with:
35
- 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"
36
+
37
+ if [ -n "$(git status --porcelain)" ]; then
38
+ # Check out the PR branch to avoid detached HEAD
39
+ git checkout ${{ github.head_ref }}
40
+ git add --all
41
+ git commit -m "chore: Apply Prettier formatting"
42
+ git push origin ${{ github.head_ref }}
43
+ else
44
+ echo "No formatting changes to commit"
45
+ fi
0 commit comments