astro/.github/workflows/format.yml
2021-12-07 12:29:30 -06:00

31 lines
732 B
YAML

name: 'Format Code'
on:
push:
branches:
- main
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Check out code using Git
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Set Node version to 16
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'yarn'
- name: Install dependencies
run: yarn --frozen-lockfile --ignore-engines
env:
CI: true
- name: Format code
run: yarn format
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: '[ci] yarn format'
branch: ${{ github.head_ref }}