2021-03-26 19:45:53 +00:00
|
|
|
name: 'Format Code'
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
format:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-11-02 14:13:36 +00:00
|
|
|
- name: Check out code using Git
|
2022-03-09 16:12:12 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-03-26 19:45:53 +00:00
|
|
|
with:
|
|
|
|
ref: ${{ github.head_ref }}
|
2022-03-08 23:20:04 +00:00
|
|
|
- name: Setup PNPM
|
2022-03-09 16:12:12 +00:00
|
|
|
uses: pnpm/action-setup@v2.2.1
|
2022-03-08 23:20:04 +00:00
|
|
|
- name: Setup Node
|
2022-03-09 16:12:12 +00:00
|
|
|
uses: actions/setup-node@v3
|
2022-03-08 23:20:04 +00:00
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
cache: 'pnpm'
|
2022-03-09 16:12:12 +00:00
|
|
|
- name: Install dependencies
|
2022-03-08 21:46:11 +00:00
|
|
|
run: pnpm install
|
2021-11-02 14:13:36 +00:00
|
|
|
- name: Format code
|
2022-06-06 16:47:28 +00:00
|
|
|
run: pnpm run format:ci
|
2021-03-26 19:45:53 +00:00
|
|
|
- name: Commit changes
|
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
with:
|
2022-03-08 21:46:11 +00:00
|
|
|
commit_message: '[ci] format'
|
2021-03-26 19:45:53 +00:00
|
|
|
branch: ${{ github.head_ref }}
|