astro/.github/workflows/format.yml
2022-01-18 16:17:47 -06:00

34 lines
784 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 }}
- uses: pnpm/action-setup@v2.0.1
with:
version: 6.23.x
- name: Set Node version to 16
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
env:
CI: true
- name: Format code
run: pnpm run format
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: '[ci] format'
branch: ${{ github.head_ref }}