mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
49 lines
1.0 KiB
YAML
49 lines
1.0 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
|
|
if: ${{ github.ref != 'refs/heads/main' }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
sparse-checkout: |
|
|
.github
|
|
src
|
|
packages
|
|
test
|
|
bench
|
|
- name: Setup Bun
|
|
uses: ./.github/actions/setup-bun
|
|
with:
|
|
bun-version: "1.1.8"
|
|
- name: Setup Zig
|
|
uses: goto-bus-stop/setup-zig@c7b6cdd3adba8f8b96984640ff172c37c93f73ee
|
|
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
|