forked from withastro/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 968 Bytes
/
Copy pathformat.yml
File metadata and controls
33 lines (30 loc) · 968 Bytes
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
name: 'Format Code'
on:
push:
branches:
- main
permissions: {}
jobs:
format:
if: ${{ github.repository_owner == 'withastro' }}
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
steps:
- name: Check out code using Git
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.head_ref }}
# Needs access to push to main
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
- name: Install Tools & Dependencies
uses: ./.github/actions/install
- name: Format code
run: pnpm run format:ci
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@4a55954c782fc1ea30b9056cd3e7a2b40ca8887d # v7.2.0
with:
commit_message: '[ci] format'
branch: ${{ github.head_ref }}
commit_user_name: fredkbot
commit_user_email: fred+astrobot@astro.build