add check format action #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Format | |
on: | |
pull_request: | |
jobs: | |
lint: | |
name: Check Format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout PR | |
uses: actions/checkout@v4 | |
- name: Get pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Check format | |
id: format-check | |
run: pnpm format:check >> "$GITHUB_OUTPUT" | |
- name: Prettier Output | |
if: ${{ failure() }} | |
run: | | |
echo "Prettier found formatting issues (see logs above). To fix these issues, run 'pnpm format' locally." |