Files
bun.sh/.github/workflows/run-format.yml
Ashcon Partovi 30dc72c17b bun run clang-format (#14148)
Co-authored-by: Electroid <Electroid@users.noreply.github.com>
2024-09-24 20:39:29 -07:00

54 lines
1.1 KiB
YAML

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: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply formatting changes