-
-
Notifications
You must be signed in to change notification settings - Fork 52
46 lines (39 loc) · 1.02 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
name: Format
on:
workflow_dispatch:
push:
branches:
- main
jobs:
format:
name: Format
if: github.repository_owner == 'withastro'
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
# Needs access to push to main
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup PNPM
uses: pnpm/action-setup@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Format code
run: pnpm run format
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "[ci] format"
branch: ${{ github.head_ref }}
commit_user_name: astrobot-houston
commit_user_email: [email protected]