name: Format permissions: contents: write on: workflow_call: inputs: zig-version: type: string required: true jobs: format: name: Format runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: sparse-checkout: | .prettierrc-ci .github .vscode src scripts packages test bench package.json bun.lockb .clang-format - name: Setup Bun uses: ./.github/actions/setup-bun with: bun-version: "1.1.25" - name: Setup Zig uses: mlugg/setup-zig@v1 with: version: ${{ inputs.zig-version }} - name: Install Dependencies run: | bun install - name: Format run: | bun fmt - name: Format Zig run: | bun fmt:zig - name: Format Cpp run: | bun fmt:cpp - name: Commit uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Apply formatting changes