mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
chore(workflow): add Biome code formatting workflow for canary branch
This commit is contained in:
33
.github/workflows/biome.yml
vendored
Normal file
33
.github/workflows/biome.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
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: Install dependencies
|
||||||
|
run: pnpm install
|
||||||
|
|
||||||
|
- name: Run Biome formatter
|
||||||
|
run: pnpm biome check --write --no-errors-on-unmatched --files-ignore-unknown=true
|
||||||
|
|
||||||
|
- name: Commit changes if needed
|
||||||
|
run: |
|
||||||
|
git config --global user.name 'github-actions[bot]'
|
||||||
|
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||||
|
git add .
|
||||||
|
git diff --quiet && git diff --staged --quiet || git commit -m "chore: auto-format with Biome"
|
||||||
|
git push
|
||||||
Reference in New Issue
Block a user