-
Notifications
You must be signed in to change notification settings - Fork 11
34 lines (29 loc) · 921 Bytes
/
format.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
name: Format
on:
push:
branches:
- '**' # Any branch
jobs:
format:
runs-on: ubuntu-latest
# Add permissions to allow commits
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
# This is important to fetch the changes to the previous commit
fetch-depth: 0
steps:
- uses: pnpm/action-setup@v4
with:
version: 9
run_install: true
- name: Prettier Action
uses: creyD/[email protected]
with:
prettier_options: '--config ./.prettierrc --ignore-path .gitignore -w "packages/**/*.{js,ts,json,css,tsx,jsx,md}" "playgrounds/**/*.{js,ts,json,css,tsx,jsx,md}"'
commit_message: "style: auto-format with action"