mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
39 lines
862 B
YAML
39 lines
862 B
YAML
name: Format Code with Biome
|
|
|
|
on:
|
|
push:
|
|
branches: [canary]
|
|
pull_request:
|
|
branches: [canary]
|
|
|
|
jobs:
|
|
format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9.5.0
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Run Biome formatter
|
|
run: pnpm biome format . --write
|
|
|
|
- name: Commit changes if needed
|
|
run: |
|
|
BRANCH=$(echo "${{ github.head_ref || github.ref_name }}")
|
|
git add .
|
|
git diff --quiet && git diff --staged --quiet || git commit -m "chore: auto-format with Biome"
|
|
git push origin HEAD:$BRANCH
|
|
|