mhsf-dev/.github/workflows/format.yml
2024-12-27 11:20:00 -06:00

43 lines
1.1 KiB
YAML

name: Format MHSF using Biomejs
# Trigger on new commits
on:
push:
branches: '**'
jobs:
format:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Setup Biome CLI
uses: biomejs/setup-biome@v2
- name: Clone MHSF
uses: GuillaumeFalourd/clone-github-repo-action@v2.3
with:
depth: 1
branch: 'main'
owner: 'DeveloLongScript'
repository: 'MHSF'
- name: Run Biome
run: biome format --write MHSF/src
- name: Push to GitHub
uses: stefanzweifel/git-auto-commit-action@v5
with:
repository: ./MHSF
commit_message: Automatically format code commited
commit_user_name: Format Bot
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>