Skip to content

Update CHANGELOG.md #20

Update CHANGELOG.md

Update CHANGELOG.md #20

Workflow file for this run

name: Format Check
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
branches:
- main
jobs:
format-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Probe repository for Bun format check
id: probe
shell: bash
run: |
if [ -f bun.lockb ] && [ -f package.json ] && grep -q '"format:check"' package.json; then
echo "run=true" >> "$GITHUB_OUTPUT"
else
echo "run=false" >> "$GITHUB_OUTPUT"
fi
- name: Setup Bun
if: steps.probe.outputs.run == 'true'
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
with:
bun-version: latest
- name: Install dependencies
if: steps.probe.outputs.run == 'true'
run: bun install --frozen-lockfile
- name: Check formatting
if: steps.probe.outputs.run == 'true'
run: bun run format:check
- name: Check if files would change
if: steps.probe.outputs.run == 'true'
run: |
if ! git diff --exit-code; then
echo "❌ Files are not properly formatted. Run 'bun run format' to fix."
exit 1
else
echo "✅ All files are properly formatted."
fi
- name: Skip - No Bun format check configured
if: steps.probe.outputs.run != 'true'
run: echo "Skipping format check (no bun.lockb and format:check script)."