regenerate lockfile #344
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Biome Code Quality Assurance" | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| quality: | |
| runs-on: "ubuntu-latest" | |
| permissions: | |
| contents: "write" | |
| steps: | |
| - name: "Checkout code" | |
| uses: "actions/checkout@v5" | |
| with: | |
| token: "${{ secrets.GITHUB_TOKEN }}" | |
| - name: "Setup Biome" | |
| uses: "biomejs/setup-biome@v2" | |
| with: | |
| version: "latest" | |
| - name: "Format with Biome" | |
| run: "biome format --write ." | |
| - name: "Check for Git changes" | |
| id: "verify-changed-files" | |
| run: | | |
| if [ -n "$(git status --porcelain)" ]; then | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: "Commit Git changes" | |
| if: steps.verify-changed-files.outputs.changed == 'true' && github.event_name == 'push' | |
| run: | | |
| git -c user.name="github-actions[bot]" -c user.email="41898282+github-actions[bot]@users.noreply.github.com" \ | |
| commit -am "chore: auto-fix formatting and linting with Biome" | |
| - name: "Push Git changes" | |
| if: steps.verify-changed-files.outputs.changed == 'true' && github.event_name == 'push' | |
| uses: "ad-m/github-push-action@master" | |
| with: | |
| github_token: "${{ secrets.GITHUB_TOKEN }}" | |
| branch: "${{ github.ref_name }}" | |
| - name: "Fail if formatting was needed" | |
| if: steps.verify-changed-files.outputs.changed == 'true' | |
| run: | | |
| echo "Biome formatting changes were needed. Please pull the latest changes." | |
| exit 1 |