-
-
Notifications
You must be signed in to change notification settings - Fork 152
37 lines (30 loc) · 847 Bytes
/
pr.yml
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
name: Clean PR
on:
pull_request:
branches:
- v2
jobs:
clean-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8.5.1
- name: Install Dependencies
run: pnpm i
- name: Run Lint
run: pnpm run lint -- --fix
- name: Run Prettier
run: pnpm format
- name: Commit and Push Changes
run: |
git config --global user.name 'KevinVandy'
git config --global user.email '[email protected]'
git add -A
git commit -m "Lint and Prettier" || exit 0 # in case no changes present
git push origin ${{ github.head_ref }}