0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/.github/workflows/format.yml
2021-11-02 08:13:36 -06:00

32 lines
790 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
- run: yarn lerna run build --scope @astrojs/parser
- 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 }}