Skip to content

Trial self-formatting PR workflow #584

Trial self-formatting PR workflow

Trial self-formatting PR workflow #584

Workflow file for this run

name: Source code lint
on:
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/[email protected]
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: https://registry.npmjs.org/
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run lint
id: lint
run: pnpm run lint
continue-on-error: true
- name: Run format
if: steps.lint.outcome != 'success'
run: pnpm run format
- name: Re-run lint
if: steps.lint.outcome != 'success'
run: pnpm run lint
- name: Commit prettier fixes
if: steps.lint.outcome != 'success'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'Automated prettier fix'