2021-03-26 14:45:53 -05:00
|
|
|
name: 'Format Code'
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
env:
|
|
|
|
node_version: 14
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
format:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: ${{ github.head_ref }}
|
2021-05-12 13:06:16 -05:00
|
|
|
- uses: actions/setup-node@v2
|
2021-03-26 14:45:53 -05:00
|
|
|
with:
|
|
|
|
node-version: ${{ env.node_version }}
|
2021-05-12 13:06:16 -05:00
|
|
|
- run: yarn --frozen-lockfile --ignore-engines
|
2021-04-30 16:33:35 -05:00
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
- run: yarn format
|
2021-03-26 14:45:53 -05:00
|
|
|
- name: Commit changes
|
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
with:
|
2021-04-30 16:33:35 -05:00
|
|
|
commit_message: '[ci] yarn format'
|
2021-03-26 14:45:53 -05:00
|
|
|
branch: ${{ github.head_ref }}
|
|
|
|
push_options: --force
|