chore: add bun formatting workflows
This commit is contained in:
1 parent
55eeff23a8
commit
fd16a433fb
12 files changed
+208
-40
No files matched your search
@@ -0,0 +1,48 @@
|
||||
name: Format Fix
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
prettier:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Ensure the selected ref is a branch
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${GITHUB_REF_TYPE}" != "branch" ]]; then
|
||||
echo "Format Fix must be run against a branch ref."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Set up Bun
|
||||
uses: oven-sh/setup-bun@v2.2.0
|
||||
with:
|
||||
bun-version: 1.3.11
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Apply formatting
|
||||
run: bun run format
|
||||
|
||||
- name: Commit formatting changes
|
||||
shell: bash
|
||||
run: |
|
||||
if git diff --quiet; then
|
||||
echo "No formatting changes to commit."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add .
|
||||
git commit -m "chore: apply formatting"
|
||||
git push
|
||||
Reference in new issue
Block a user