Skip to content

Commit 4fba68a

Browse files
committed
👷 Use actions--create-commit
1 parent 8b590da commit 4fba68a

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

.github/workflows/fix.yaml

+10-14
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v4
1616
with:
17-
ref: ${{ github.head_ref }}
17+
ref: ${{ github.ref }}
1818
- uses: pnpm/action-setup@v4
1919
with:
2020
version: latest
@@ -25,17 +25,13 @@ jobs:
2525
- run: pnpm install
2626
- run: pnpm run lint:fix
2727

28-
- id: diff
29-
run: |
30-
if [[ -n $(git status --porcelain) ]]; then
31-
echo 'changes=true' >>"$GITHUB_OUTPUT"
32-
fi
33-
34-
- if: steps.diff.outputs.changes == 'true'
35-
name: Commit and push
36-
run: |
37-
git config user.name 'github-actions[bot]'
38-
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
28+
- uses: qoomon/actions--create-commit@v1
29+
id: actions--create-commit
30+
with:
31+
message: |
32+
🎨 pnpm run lint:fix
33+
github-actions[bot]
34+
skip-empty: true
3935

40-
git commit --all --message '🎨 pnpm run lint:fix' --message '[dependabot skip]'
41-
git push
36+
- if: ${{ steps.actions--create-commit.outputs.commit }}
37+
run: git push

0 commit comments

Comments
 (0)