2021-03-26 14:45:53 -05:00
|
|
|
name: 'Format Code'
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
format:
|
|
|
|
runs-on: ubuntu-latest
|
2022-07-01 15:04:36 -05:00
|
|
|
env:
|
|
|
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
2021-03-26 14:45:53 -05:00
|
|
|
steps:
|
2021-11-02 09:13:36 -05:00
|
|
|
- name: Check out code using Git
|
2022-03-09 11:12:12 -05:00
|
|
|
uses: actions/checkout@v3
|
2021-03-26 14:45:53 -05:00
|
|
|
with:
|
|
|
|
ref: ${{ github.head_ref }}
|
2022-06-27 13:11:19 -05:00
|
|
|
# Needs access to push to main
|
|
|
|
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
|
2022-10-28 11:40:03 -05:00
|
|
|
- name: Install Tools & Dependencies
|
|
|
|
uses: ./.github/actions/install
|
2021-11-02 09:13:36 -05:00
|
|
|
- name: Format code
|
2022-06-06 11:47:28 -05:00
|
|
|
run: pnpm run format:ci
|
2021-03-26 14:45:53 -05:00
|
|
|
- name: Commit changes
|
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
with:
|
2022-03-08 16:46:11 -05:00
|
|
|
commit_message: '[ci] format'
|
2021-03-26 14:45:53 -05:00
|
|
|
branch: ${{ github.head_ref }}
|
2022-06-27 13:32:24 -05:00
|
|
|
commit_user_name: fredkbot
|
|
|
|
commit_user_email: fred+astrobot@astro.build
|