* GitHub Actions: add install action to reduce duplication * debug, temp * expect strings add warnings * minor, consistency Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
30 lines
803 B
YAML
30 lines
803 B
YAML
name: 'Format Code'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
format:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
steps:
|
|
- name: Check out code using Git
|
|
uses: actions/checkout@v3
|
|
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@v4
|
|
with:
|
|
commit_message: '[ci] format'
|
|
branch: ${{ github.head_ref }}
|
|
commit_user_name: fredkbot
|
|
commit_user_email: fred+astrobot@astro.build
|