name: autofix.ci # Must be named this for autofix.ci to work

on:
  workflow_dispatch:
  pull_request:
  push:
    branches:
      - main

permissions:
  contents: read

jobs:
  format:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Setup Bun
        uses: oven-sh/setup-bun@v2
      - name: Install Dependencies
        run: bun install
      - name: Format
        run: |
          bun run format
          bun run build
      - name: Commit
        uses: autofix-ci/action@d3e591514b99d0fca6779455ff8338516663f7cc
