-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (34 loc) · 963 Bytes
/
fix.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Fix
on:
pull_request:
branches: main
jobs:
fix:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: pnpm/action-setup@v4
with:
version: latest
- uses: actions/setup-node@v4
with:
node-version: latest
cache: pnpm
- run: pnpm install
- run: pnpm run lint:fix
- id: diff
run: |
if [[ -n $(git status --porcelain) ]]; then
echo 'changes=true' >>"$GITHUB_OUTPUT"
fi
- if: steps.diff.outputs.changes == 'true'
name: Commit and push
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git commit --all --message '🎨 pnpm run lint:fix' --message '[dependabot skip]'
git push